v5.6.0 built for MS-Win32-x86-multi-threa
with patch ActivePerl Build 618
When I manually issue a certain command in DOS,
the exit code is 1:
But when I run this short perl program,
$x = system("cmd badarg");
print "exit code: $x \n";
the exit code returned
by the 'system' command is 0:
perl exitcheck.pl(ERROR MSG)
exit code: 0
This does not happen with all commands; just with some.
The command in question is actually a batch file:
and I am wondering if this has something to do with the problem.
The cmd.bat file runs a java application.
I am finding that I cannot rely on the 'system' call to accurately
report exit codes on NT (I have not had this problem on Unix or Linux).
Is there some other method of checking the exit code of a command on WinNT?