FWIW, I've had -1 returned for $? in the past when I've set up SIGCHLD and then used perl's builtin fork/exec stuff (i.e. backticks, system(), qx()). I'm assuming perl (or the C library) sets up it's own waitpid() and/or sighandler for these expecting to reap the process and then I come along and screw things up with my SIGCHLD handler. Maybe someone with more wisdom can figure out how to do this right, but I tend to avoid setting up SIGCHLD and generally find that I don't need to.
bluto
In reply to Re: sigchild and $?
by bluto
in thread sigchild and $?
by Chapter_01
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |