Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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 pondering the Monastery: (2)
As of 2023-04-01 17:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?