in reply to $? is -1???

with a SIG{CHLD} handler to keep track of when they all finish

This is a direct quote from the perlvar manpage:

If you have installed a signal handler for "SIGCHLD", the value of $? will usually be wrong outside that handler.

If as you say, it should never be a negative number, this could possibly be the explanation,
davidj

Replies are listed 'Best First'.
Re^2: $? is -1???
by kscaldef (Pilgrim) on Jun 20, 2004 at 06:13 UTC
    Yeah, I read that, but the sub I posted is the SIGCHLD handler, so it doesn't seem that that applies.