From: Francis Cianfrocca Date: 2006-08-08T06:32:08+09:00 Subject: Re: How to recognize which child process has just ended? unknown wrote: > i don't think that's sufficient - one would still need a sig handler, > something along the lines of: > That's a surprise, what made you think so? Is that true on Windows, perhaps? On Unix no sig handler is needed. SIGCHLD is ignored by default. The following works: #---------------------- fork {exit 42} fork {exit 2} Process.wait2 Process.wait2 #---------------------- You can also call #wait and its variants with the flag Process::WNOHANG if you want to poll. Use a SIGCHLD handler if you need to know instantly when a child process finishes, but as always observe the standard guidelines for coding signal handlers. -- Posted via http://www.ruby-forum.com/.