parallel: Bugfix for Mac OS X: $SIG{TERM} is undef

This commit is contained in:
Ole Tange 2011-01-25 15:32:41 +01:00
parent 7d0cffa186
commit 5a098fa66b
3 changed files with 3 additions and 8 deletions

View file

@ -1,8 +1,3 @@
-N for --pipe. Fixed race condition in --pipe.
Tests for --pipe.
Passes testsuite.
codecoverage
Testsuite: sem without ~/.parallel

View file

@ -11,7 +11,7 @@ use strict;
use Carp;
$::oodebug=0;
$Global::original_sigterm = $SIG{TERM};
$Global::original_sigterm = $SIG{TERM} || sub { exit 0; }; # $SIG{TERM} is not set on Mac OS X
$SIG{TERM} = sub {}; # Dummy until jobs really start
open $Global::original_stderr, ">&STDERR" or die "Can't dup STDERR: $!";

View file

@ -5,5 +5,5 @@ SERVER2=parallel-server2
echo '### Test -M (--retries to avoid false errors)'
seq 1 30 | parallel -j5 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo
seq 1 30 | parallel -j10 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo
seq 1 30 | parallel -j5 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo 2>/dev/null
seq 1 30 | parallel -j10 --retries 3 -k -M -S $SERVER1,parallel@$SERVER2 echo 2>/dev/null