mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel: SIGHUP instead of SIGTERM, and SIGTERM instead of 2xSIGTERM.
This commit is contained in:
parent
fe4173927f
commit
0fa1bbff20
|
@ -4184,10 +4184,10 @@ sub start_no_new_jobs() {
|
||||||
# %Global::unlink
|
# %Global::unlink
|
||||||
# $Global::start_no_new_jobs
|
# $Global::start_no_new_jobs
|
||||||
# Returns: N/A
|
# Returns: N/A
|
||||||
$SIG{TERM} = $Global::original_sig{TERM};
|
# $SIG{TERM} = $Global::original_sig{TERM};
|
||||||
unlink keys %Global::unlink;
|
unlink keys %Global::unlink;
|
||||||
::status
|
::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).
|
"$Global::progname: Waiting for these ".(keys %Global::running).
|
||||||
" jobs to finish. Send SIGTERM to stop now.");
|
" jobs to finish. Send SIGTERM to stop now.");
|
||||||
list_running_jobs();
|
list_running_jobs();
|
||||||
|
@ -12436,7 +12436,8 @@ sub main() {
|
||||||
if($Global::semaphore) {
|
if($Global::semaphore) {
|
||||||
$sem = acquire_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) {
|
if($opt::tee or $opt::shard) {
|
||||||
# All jobs must be running in parallel for --tee/--shard
|
# All jobs must be running in parallel for --tee/--shard
|
||||||
|
|
Loading…
Reference in a new issue