Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Using 'kill' to see if a process is stil alive

by ambrus (Abbot)
on Jul 29, 2004 at 19:05 UTC ( #378468=note: print w/replies, xml ) Need Help??


in reply to Using 'kill' to see if a process is stil alive

If a process exits (or dies in any way), it becomes a zombie. When this happens, the parent gets a SIGCHLD. The parent process of the zombie can harvest the child with waitpid(2) or wait(2) or wait4(2).

You have to use the builtin function waitpid to see if the child process is still living.

For an example about this, see perldoc perlipc.

Edit: clarified first para, as Zaxo notes in his reply. Original text was:

If a process exits (or dies in any way), it becomes a zombie. The parent process of the zombie can harvest it with waitpid(2) or wait(2) or wait4(2). When this happens, the parent gets a SIGCHLD.

  • Comment on Re: Using 'kill' to see if a process is stil alive

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://378468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2022-09-27 05:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer my indexes to start at:




    Results (118 votes). Check out past polls.

    Notices?