process dies on MAC ..

Discussion in 'Ruby' started by Larz, Nov 17, 2008.

  1. Larz

    Larz Guest

    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.
     
    Larz, Nov 17, 2008
    #1
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dan byers
    Replies:
    1
    Views:
    731
    Hans =?iso-8859-1?Q?J=F8rgen?= Jakobsen
    Mar 6, 2004
  2. Vedran Vukotic

    infinite loop unexpectly dies

    Vedran Vukotic, Mar 2, 2006, in forum: Perl
    Replies:
    0
    Views:
    4,675
    Vedran Vukotic
    Mar 2, 2006
  3. I appreciate your help.... anony

    Holding Page for when Application Domain dies?

    I appreciate your help.... anony, Dec 19, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    455
    I appreciate your help.... anony
    Dec 22, 2003
  4. OtisUsenet
    Replies:
    2
    Views:
    1,774
    OtisUsenet
    Aug 27, 2004
  5. Дамјан ГеоргиевÑки

    end child process when parent dies (on Unix)

    Дамјан ГеоргиевÑки, Nov 17, 2008, in forum: Python
    Replies:
    4
    Views:
    847
    Miles
    Nov 18, 2008
  6. Christopher M. Lusardi
    Replies:
    3
    Views:
    352
    Alan J. Flavell
    Oct 19, 2003
  7. Paul Clements
    Replies:
    2
    Views:
    293
    Ben Morrow
    Feb 11, 2004
  8. Replies:
    2
    Views:
    253
Loading...