It's Unix. (Cygwin, really, but since that's designed to act like Unix...)
Thanks for the help with question 3. I'm keeping all the child PIDs in a linked list, so that'd be relatively easy. (The...
Type: Posts; User: DavidG
It's Unix. (Cygwin, really, but since that's designed to act like Unix...)
Thanks for the help with question 3. I'm keeping all the child PIDs in a linked list, so that'd be relatively easy. (The...
Just a couple of things I need to know about processes:
1 - is there a way to test if a particular process is still running?
(assuming you've got its PID, of course)
2 - is there a way to make...
To put it simply(ish), a pointer variable isn't a char, or int, or whatever it's pointing to - it just holds the memory address of whatever it's pointing to. (As an unsigned integer, I believe....
Just wondering... does the execl() function use the PATH environment variable? (Or whatever it's called.)
If not, how can I get it to? Would I have to split up the search path string manually, and...
Next time, Pythagoras. Next time.[/drclaw]
He's got a point about the newline though.
Unless, of course, the output is supposed to be hard to read, just to annoy the teacher.
I couldn't do it without both arms and a stepladder. :D
Right, thanks. That's a great help, I've always had a bit of a blind spot with pointers. I'll try it out later.
Well, I didn't make the strtok() function myself, it's included in one of the C header files, so I have no idea how to make my own version.
Would doing something like strcpy(cmd.command,...
Ah, I see what you mean. How do I give it the "input" string to split up? Just give it 'input' instead of 'NULL'?
All I know is that strtok() is supposed to return a string... I suppose that'd be a char *, yeah.
What do you mean by "pass cmd by reference"?
Nice. I thought it was a picture of a galaxy or something, until I saw the text at the top.
Interesting how it seems to be more concentrated along the lines to the corners, isn't it? Especially...
This is part of the code from a shell program I'm working on:
struct c {
char command[10];
char argument1[40];
char argument2[40];
};