Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: delayed die and open3

by cazz (Pilgrim)
on Mar 31, 2005 at 15:31 UTC ( [id://443860]=note: print w/replies, xml ) Need Help??


in reply to delayed die and open3

eval is not trapping the failed open3 call as you expect. Trim your code down to this:
[bmc@hacked lib]$ perl -MIPC::Open3 -e 'eval {$pid = open3(*IN, *OUT, +*ERR, @ARGV);}; print "ACK $@\n" if ($@);' asdf [bmc@hacked lib]$
Note that ack isn't printed. eval is working as expected as you can see when you call the same code with no args:
[bmc@hacked lib]$ perl -MIPC::Open3 -e 'eval {$pid = open3(*IN, *OUT, +*ERR, @ARGV);}; print "ACK $@\n" if ($@);' ACK open3(*main::IN, *main::OUT, *main::ERR): not enough arguments at +-e line 1 [bmc@hacked lib]$

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-24 10:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found