On Mon, Jul 17, 2023 at 7:56 AM Deepak Khosla via par <par@perl.org> wrote: > ========================== > use strict; > use warnings; > my $exit_code = $ARGV[0]; > print "called with $0 $exit_code\n"; > > END { > $? = $exit_code; # Setting this in case exit is ignoring our exit_code > print STDERR "Exiting final with exit_status $exit_code, ? = $? \n"; > exit ($exit_code); > } > =============================== > ... > But running the packaged version - I get varied results. The sample code always returns 0 for $? But my bigger piece of code provides proper code for 0 or 2, but a 0 when exiting with a 1. > [dkhosla]$ ./t 2 > called with ./t 2 > Exiting final with exit_status 2, ? = 2 > [dkhosla]$ echo $? > 0
It's a bug in PAR::Packer 🙁 Please try with HEAD from https://github.com/rschupp/PAR-Packer Cheers, Roderich