Forum: Ruby process dies on MAC ..

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
71477e5162d702dae2a072d66a855fec?d=identicon&s=25 Larz (Guest)
on 2008-11-17 15:45
(Received via mailing list)
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.
This topic is locked and can not be replied to.