Actually, using a signal handler to reap children is problematic in Perl because Perl signal handlers aren't 100% reliable. Each time one is trigger, you have something like a 2% chance of corrupting Perl's internal structures. I think this may be fixed in a an upcoming version of Perl.
The safest way to reap children is shown under "perldoc -f waitpid" and closely matches the code in question. Perhaps Solaris doesn't define WNOHANG as 1? That seems unlikely, but that is all I've come up with so far.
- tye (but my friends call me "Tye")In reply to (tye)Re: fork()ing a large process
by tye
in thread fork()ing a large process
by Jonathan
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |