Subject: | Dont set $SIG{CHLD}="IGNORE" |
By setting $SIG{CHLD}="IGNORE" all system() calls in the same process are broken with respect to the return value:
$ perl5.22.0 -e 'system("true"); warn $?'
0 at -e line 1.
$ perl5.22.0 -MParallel::WorkUnit -e 'Parallel::WorkUnit->new; system("true"); warn $?'
-1 at -e line 1.
Actually, as wait() or waitall() has to be called anyway and these methods reap the children, I don't see that it's necessary to set $SIG{CHLD} at all. Is this just for double safety, or is there another reason?