[Melbourne-pm] $SIG{CHLD}

Scott Penrose scottp at dd.com.au
Sat May 3 17:31:26 PDT 2008


Hey Dudes

To capture exit values of forked daemons and not end up with a set of 
zombie processes, we need to set $SIG{CHLD} to either 'ignore' or do it 
fully. However once you do you loose the ability to capture the return 
value of a 'system' call - unless you do it the hard way (record in a 
hash the value by process id and then use that and remove it after your 
system call).

Anyway to get this all written down I wrote it on my site, but also as 
partly an open question - is there a better way of doing 'system' which 
does not depend on changes to $SIG{CHLD} or other solutions:

http://scott.dd.com.au/wiki/SIG_CHLD

So anyone know of one?

Scott


More information about the Melbourne-pm mailing list