Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: system() does not wait

by fizbin (Chaplain)
on Dec 01, 2005 at 01:23 UTC ( #513168=note: print w/replies, xml ) Need Help??


in reply to system() does not wait

I don't think that SCRIPT2 is ever getting invoked. The reason I think that is that I strongly suspect that $? is -1 inside SCRIPT1. (please post the actual $? value, not $?>>8)

I strongly urge you to put the following code, taken from the perlfunc manpage where it talks about the system call, after your call to system:

if ($? == -1) { print "failed to execute: $!\n"; } elsif ($? & 127) { printf "child died with signal %d, %s coredump\n", ($? & 127), ($? & 128) ? 'with' : 'without'; } else { printf "child exited with value %d\n", $? >> 8; }
I suspect that you'll see the "failed to execute" message.
--
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://513168]
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 2022-01-27 12:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?