Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: How to optionally kill a child, and capture status if not killed.

by joelr (Novice)
on Apr 25, 2008 at 21:49 UTC ( #682926=note: print w/replies, xml ) Need Help??


in reply to Re: How to optionally kill a child, and capture status if not killed.
in thread How to optionally kill a child, and capture status if not killed.

Thanks pc88mxer!

Great tips.

The key was to wait for either process to finish in the parent, and to use "exec" instead of "system" to not consume the status read by "$?". Before that, I could not get "$?" to reflect the status.

I will update the example for any future searches.

  • Comment on Re^2: How to optionally kill a child, and capture status if not killed.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://682926]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2018-07-15 19:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (326 votes). Check out past polls.

    Notices?