From 0fa1bbff200cda816d61b2885f6bb49708da7dac Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Sun, 17 Mar 2019 23:28:49 +0100 Subject: [PATCH] parallel: SIGHUP instead of SIGTERM, and SIGTERM instead of 2xSIGTERM. --- src/parallel | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/parallel b/src/parallel index 5c21003f..e347024b 100755 --- a/src/parallel +++ b/src/parallel @@ -4184,10 +4184,10 @@ sub start_no_new_jobs() { # %Global::unlink # $Global::start_no_new_jobs # Returns: N/A - $SIG{TERM} = $Global::original_sig{TERM}; +# $SIG{TERM} = $Global::original_sig{TERM}; unlink keys %Global::unlink; ::status - ("$Global::progname: SIGTERM received. No new jobs will be started.", + ("$Global::progname: SIGHUP received. No new jobs will be started.", "$Global::progname: Waiting for these ".(keys %Global::running). " jobs to finish. Send SIGTERM to stop now."); list_running_jobs(); @@ -12436,7 +12436,8 @@ sub main() { if($Global::semaphore) { $sem = acquire_semaphore(); } - $SIG{TERM} = \&start_no_new_jobs; + $SIG{TERM} = $Global::original_sig{TERM}; + $SIG{HUP} = \&start_no_new_jobs; if($opt::tee or $opt::shard) { # All jobs must be running in parallel for --tee/--shard