From: neil Date: 2002-05-06T03:52:50+09:00 Subject: Re: defunct child process Mark Slagell wrote: > > neil wrote: > > >neil wrote: > > > > > >>I cannot claim this the correct way, > >>though it is based on some Pick Axe > >>code, > >> > >> > > > >Sorry that got mangled, > > > > trap("CLD"){ # child finished > > begin > > waitpid(Process.wait, > >Process::WNOHANG) > > rescue StandardError > > break > > end > > } > > > > and get the Procees.uid if you want to > > > > > > Or you might find it sufficient to say > > trap('CLD') {Process.wait2} > > -- Mark True, though without the rescue you can get an fatal error with Process.wait2, "failed to convert array into an integer" and again fatal with Process.wait::WNOHANG No child processes (Errno::ECHILD) The break is redundant, sorry is a bit of left over code. Neil -- http://www.quill.plus.com