mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 22:17:54 +00:00
parallel: $SHELL is sometimes not set in Mac OS X
This commit is contained in:
parent
0ac229a2fe
commit
1d3bc2eff5
|
@ -33,6 +33,11 @@ use strict;
|
||||||
|
|
||||||
$::oodebug=0;
|
$::oodebug=0;
|
||||||
$SIG{TERM} ||= sub { exit 0; }; # $SIG{TERM} is not set on Mac OS X
|
$SIG{TERM} ||= sub { exit 0; }; # $SIG{TERM} is not set on Mac OS X
|
||||||
|
if(not $ENV{SHELL}) {
|
||||||
|
# $ENV{SHELL} is sometimes not set on Mac OS X
|
||||||
|
print STDERR ("parallel: Warning: \$SHELL not set. Using /bin/sh\n");
|
||||||
|
$ENV{SHELL} = "/bin/sh";
|
||||||
|
}
|
||||||
%Global::original_sig = %SIG;
|
%Global::original_sig = %SIG;
|
||||||
$SIG{TERM} = sub {}; # Dummy until jobs really start
|
$SIG{TERM} = sub {}; # Dummy until jobs really start
|
||||||
open $Global::original_stderr, ">&STDERR" or ::die_bug("Can't dup STDERR: $!");
|
open $Global::original_stderr, ">&STDERR" or ::die_bug("Can't dup STDERR: $!");
|
||||||
|
|
Loading…
Reference in a new issue