in reply to Re: Spawned process exit status
in thread Spawned process exit status

I made the changes and still I get the same. The script exits with an error code of 13 and $? reports back with 0.
@args = ("/test/conf.pl", $cfg_test, $cfg_stat ); system(@args) == 0 or die "system @args failed: $?"; $exit_value = $? >> 8; $signal_num = $? & 127; $dumped_core = $? & 128; print "EXIT VALUE = $exit_value\n"; print "SIGNAL = $signal_num\n"; print "CORE = $dumped_core\n";

Replies are listed 'Best First'.
Re^3: Spawned process exit status
by waswas-fng (Curate) on Jun 23, 2005 at 16:16 UTC
    That is because it never gets to your print "EXIT VALUE.. line when there is a non 0 exit on the conf.pl script. You explicitly tell it to die and spit out the unprocessed error held in $?.
    What do you think this line does? system(@args) == 0 or die "system @args failed: $?";


    -Waswas