# Process dies on MAC

**URL:** <https://www.ruby-forum.com/t/process-dies-on-mac/153461>\
**Category:** Ruby\
**Created:** [November 17, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/process-dies-on-mac/153461 "2008-11-17T15:45:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/85f322/32.png) [@Larz](https://www.ruby-forum.com/u/Larz)\
**Post date:** [November 17, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/process-dies-on-mac/153461/1 "2008-11-17T15:45:38Z")

</div>

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 ’ I no  
longer see them when for a while previously they where there.
