in reply to Parent process does not wait for Child processes to finish and exits after the waitpid statement

In short: if this is Windows, I think your program is killed by exec in the child.
  • Comment on Re: Parent process does not wait for Child processes to finish and exits after the waitpid statement

Replies are listed 'Best First'.
Re^2: Parent process does not wait for Child processes to finish and exits after the waitpid statement
by scriptstudent (Initiate) on Feb 07, 2012 at 15:42 UTC
    Thanks for the comments... I did not realize that fork() may have issues on the windows platform. I would try spawning a thread for each process and then have the parent wait for those threads to exit. Would also need to capture the exit status of the parent if exiting abruptly. Thanks again..