03-13-06 12:51 PM
>Certainly, just change stdout after the call to 'fork' in just the child.
But won't that also change the stdout of the parent process? My
understanding is that file handle You can't use stdio in both the
parent and the child unless you call
>'exec'. If you call 'exec', there is no 'I' any more. s are inherited and shared be
tween >parent/child.
But if I'm understanding this correctly, exec also doesn't return if
the call is successful; I need both parent and child to be running.
I guess I could just start a new process via system() or such, but I
wanted for the child to automatically end if the parent ended. I also
guess I could use some sort of IPC to kill the child if the parent
ends, but I was hoping for something simplier.
[ Post a follow-up to this message ]
|