Subject: | Exit code not propagated from PAR-packed executables |
Perl: This is perl, v5.6.1 built for MSWin32-x86-multi-thread
Binary build 633 provided by ActiveState Corp. http://www.ActiveState.com
OS: WindowsXP
PAR: 0.74
Module::ScanDeps: 0.28
The exit code of a PAR-packed script is always 0 (i.e. OK),
no matter what the script returned. Example:
H:\>perl -e "die q[oops]"
oops at -e line 1.
H:\>echo %ERRORLEVEL%
255
H:\>pp -o oops.exe -e "die q[oops]"
H:\>oops.exe
oops at script/ppMr88d.pl line 1.
H:\>echo %ERRORLEVEL%
0
This error is probably not OS-specific, patch follows:
--- myldr/main.c.orig 2003-09-04 16:20:25.464730500 +0200
+++ myldr/main.c 2003-09-04 16:19:16.316679500 +0200
@@ -131,7 +131,7 @@
return exitstatus;
}
- perl_run( my_perl );
+ exitstatus = perl_run( my_perl );
perl_destruct( my_perl );
if ( getenv("PAR_SPAWNED") == NULL ) {