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?
[karlgoethebier]: jedikaiti: íHola! Don't turn out the stars tonight
[jedikaiti]: Howdy! Is that link SFW?
[karlgoethebier]: jedikaiti: safe for work? it's youtube...
[jedikaiti]: Which could be anything
[karlgoethebier]: karlgoethebier: some say shockwave isn't safe for work. no risk, no fun ;-)

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2017-06-27 15:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (609 votes). Check out past polls.