If you call waitpid() on a process, and set WNOHANG, waitpid() will return immediately if the process is not dead yet. Of course, it will return immediately if the process is dead, so how do you...
Type: Posts; User: cas
If you call waitpid() on a process, and set WNOHANG, waitpid() will return immediately if the process is not dead yet. Of course, it will return immediately if the process is dead, so how do you...
Are you sure gdb can follow children? And when you use WNOHANG, are you sure that it's actually reaping the child? That is, are you checking waitpid()'s return value?
If fork() is not returning...
If waitpid() is appearing to hang, that means the child has not exited. To have a process run in the background, but still be able to reap children, look at the WNOHANG flag for waitpid().
To...