Merge "Skip child process kills in stack.sh exit trap"
This commit is contained in:
4
stack.sh
4
stack.sh
@@ -595,7 +595,9 @@ trap exit_trap EXIT
|
|||||||
function exit_trap {
|
function exit_trap {
|
||||||
local r=$?
|
local r=$?
|
||||||
jobs=$(jobs -p)
|
jobs=$(jobs -p)
|
||||||
if [[ -n $jobs ]]; then
|
# Only do the kill when we're logging through a process substitution,
|
||||||
|
# which currently is only to verbose logfile
|
||||||
|
if [[ -n $jobs && -n "$LOGFILE" && "$VERBOSE" == "True" ]]; then
|
||||||
echo "exit_trap: cleaning up child processes"
|
echo "exit_trap: cleaning up child processes"
|
||||||
kill 2>&1 $jobs
|
kill 2>&1 $jobs
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user