Hello!
I'm wondering if there is any Linux reference manual similar to the once for Amiga. For Amiga there was a series of books called "Amiga ROM Kernel Reference Manual", where I mainly used the...
Type: Posts; User: Zarniwoop
Hello!
I'm wondering if there is any Linux reference manual similar to the once for Amiga. For Amiga there was a series of books called "Amiga ROM Kernel Reference Manual", where I mainly used the...
Maybe I should have written the explanation above the code instead of below, so I'll write it again, on it's own:
As I wrote above, I get a segmentation fault when I try to add the third string....
Hello again!
It seems that I have received a problem when I added functionality using the above. I now created a function for adding a new "processes" to the array, but I'm getting segmentation...
Thanks to quzah's example I found the bug. I don't know if I did things right from the start, but I discovered something that it seems everyone missed. I try to read processes[x].pid as a string in...
Thanks, but it doesn't work here for some reason. Now I'm doing (in my program I will use variables for the string and the size of it). I've tried both with the number of chars, and with number of...
I don't understand how you mean?
What I want to do is the following. I have created a shell, and when the user start e.g. emacs using e.g. "emacs test.c &", he/she can continue using the shell....
Not very explaining title maybe, but don't know how to explain shortly.
I'm trying to create an array of structs, but as I'm not very good at structs so I'm getting some problems. What I want to...
Thank you for all the responses.
itsme86: How do I detect "SIGCHLD" if I don't wait? Or can I check for incoming signals regularly? I assume that would be useful for ignoring Ctrl+C also?
Hello!
I'm writing a shell and by now it works pretty well, even though I still haven't managed to incorporate ncurses/termios yet. But when I run a program from my shell using "&", and shutdown...
Hi!
Thanks for the quick answer. It turns out that it is multi-byte sequences, first 91, then 65-68.
I'm not sure how I will do now, but it might be better to use the function you suggest. It...
Hi!
I'm trying to write my own shell, and I've got it working pretty well now. But I want to add options like tab-completion, and input-buffer (i.e. so you can use the arrow characters to reuse...
Hello!
I am trying to create a sort of chat program as an exercise. I have an example from a book showing how to create a connectionless server and a connectionless client with internet sockets,...
Hello!
For a program I wrote I learned how to redirect stdout from one program to stdin of another program by using dup() etc. Now I am writing my own shell and it's going pretty well (although I...
Hi!
I usually do it as follows. It might look a bit complicated, but I works for me:
char* tmp=(char *)malloc(50*sizeof(char)); // Room for 50 chars. Set to what you want, one
...
Thank you!
The example on that page was great. It does exactly what I wanted in my program so I'll use that.
The reason I want to use a boolean is that the tempfile is used to store information...
I like the book "Interprocess communication in Unix - The nooks and crannies" by John Shapley Gray. It covers everything about sockets I'd say, and the examples are in C.
Examples of contents is...
Sorry, the function was sighandler (it has to work in Unix aswell as Linux)
Hello again!
Unfortunately I encountered problems after finding my function.
What I want to do is to handle the situation where the user tries to end the program by "Ctrl-C" so a temp-file is...
Great! That worked!
Thank you very much :-)
Thanks, that helps me to find the names of the syscalls, but I still don't have information on how they work.
At work I'm using Ubuntu 7.10 and there it works, but not in Xubuntu 8.10.
Hello!
I recently installed Xubuntu 8.04, among other thing for programming c, but now I have discovered that the manual for C (section 2) seems to be missing. "man -s2 intro" works, but "man -s2...
Thank you guys. I'm sorry about the FAQ, I looked there but I didn't find the entry vart is referring to.
I think I'll go with the termcap library then, if other shells use it. Thanks for the tip.
If you want to read until the end of input, when you are reading from stdin (i.e. if the user is typing). You want to look for end of line, or from a string (char-array) a NULL-value (0).
If you...
Never mind. I got it working. It doesn't look to nice, but it works now :-)
Based on the discussion "Problems sorting a string" I did my own bubblesort-function. It works fine except for the three Swedish characters "едц" (not sure if these will be visible depending on you...