Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: $? is -1???

by kscaldef (Pilgrim)
on Jun 21, 2004 at 15:52 UTC ( [id://368488]=note: print w/replies, xml ) Need Help??


in reply to Re: $? is -1???
in thread $? is -1???

I've cut the handler down as much as I think I can to just:

while ((my $pid = waitpid(-1, &WNOHANG)) > 0) { $children--; # need this to tell when we're done $exits{$pid} = $?; # need this to see the problem }

then I dump %exits at the end of the script. However, I still see output like:

18106 0
18116 0
18113 -1
18105 0

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://368488]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-20 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found