Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: system() does not wait

by fizbin (Chaplain)
on Dec 01, 2005 at 01:23 UTC ( [id://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?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2024-04-25 14:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found