Subject: | Unable to run pp binaries as login shell |
par.pl can't figure out progname when the binary is started as a login shell. The attached patch
fixes this in at least FreeBSD, albeit probably not the right way.
Subject: | par.pl.diff |
--- PAR-Packer-1.009/script/par.pl 2011-03-22 17:53:30.000000000 +0000
+++ PAR-Packer-1.009-new/script/par.pl 2011-03-31 18:09:43.167811885 +0000
@@ -861,6 +861,10 @@
$progname ||= $0;
+ if ($progname =~ /^-/ and $ENV{SHELL}) {
+ $progname = $ENV{SHELL};
+ }
+
if ($ENV{PAR_TEMP} and index($progname, $ENV{PAR_TEMP}) >= 0) {
$progname = substr($progname, rindex($progname, $Config{_delim}) + 1);
}