forked from josch/mmdebstrap
send SIGHUP to children if tar failed
This commit is contained in:
parent
0da6f103a1
commit
ff2910a746
1 changed files with 5 additions and 0 deletions
|
@ -5763,7 +5763,12 @@ sub main() {
|
||||||
if ($@) {
|
if ($@) {
|
||||||
# we cannot die here because that would leave the other thread
|
# we cannot die here because that would leave the other thread
|
||||||
# running without a parent
|
# running without a parent
|
||||||
|
# We send SIGHUP to all our processes (including eventually
|
||||||
|
# running tar and this process itself) to reliably tear down
|
||||||
|
# all running child processes. The main process is not affected
|
||||||
|
# because we are ignoring SIGHUP.
|
||||||
warning "creating tarball failed: $@";
|
warning "creating tarball failed: $@";
|
||||||
|
kill HUP => -getpgrp();
|
||||||
$exitstatus = 1;
|
$exitstatus = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue