From 1d3bc2eff502f7d529ac0f0f9e070e852606ebe9 Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 13 Nov 2011 13:19:15 +0100 Subject: [PATCH] parallel: $SHELL is sometimes not set in Mac OS X --- src/parallel | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parallel b/src/parallel index d3777bfe..e15cdae9 100755 --- a/src/parallel +++ b/src/parallel @@ -33,6 +33,11 @@ use strict; $::oodebug=0; $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; $SIG{TERM} = sub {}; # Dummy until jobs really start open $Global::original_stderr, ">&STDERR" or ::die_bug("Can't dup STDERR: $!");