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. Advertising

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. OtisUsenet
    Replies:
    2
    Views:
    1,656
    OtisUsenet
    Aug 27, 2004
  2. Дамјан ГеоргиевÑки

    end child process when parent dies (on Unix)

    Дамјан ГеоргиевÑки, Nov 17, 2008, in forum: Python
    Replies:
    4
    Views:
    635
    Miles
    Nov 18, 2008
  3. Christopher M. Lusardi
    Replies:
    3
    Views:
    179
    Alan J. Flavell
    Oct 19, 2003
  4. Paul Clements
    Replies:
    2
    Views:
    192
    Ben Morrow
    Feb 11, 2004
  5. Replies:
    2
    Views:
    143
Loading...

Share This Page