Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
No such thing as a small change
 
PerlMonks  

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?

Hi,

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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2014-04-23 21:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (555 votes), past polls