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

Re: Is "die" the best way to be atomic?

by mce (Curate)
on Apr 27, 2004 at 10:10 UTC ( #348427=note: print w/ replies, xml ) Need Help??

in reply to Is "die" the best way to be atomic?


You also could rely on the calling shell to do it for you.

$rc=system(<<EOF); set -e ls this_command_does_not_exist EOF die if $rc;
But this solution fits more in the ShellMonks :-)

PS: I don't know why, but $? is not set!!

Dr. Mark Ceulemans
Senior Consultant
BMC, Belgium

Comment on Re: Is "die" the best way to be atomic?
Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2015-11-26 01:11 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (695 votes), past polls