process dies on MAC ..

L

Larz

I do a fork and then waitpid2 with WNOHANG specified. This typically
works fine, but sometimes the child process just dies for some reason
and waitpid2 never gets anything back. The parent keeps waiting for it
evey now and then, but the wait call can never be satisfied really.
What is a good way to tell if a child process given a pid is still
running ? I saw there is a WUNTRACED option, but I am not clear what
it does. It mentions something about stopped processes, but these
child processes just dissapear. If I do a 'ps -ef | grep <pid>' I no
longer see them when for a while previously they where there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,050
Members
48,769
Latest member
Clifft

Latest Threads

Top