Browse code

Merge "Skip child process kills in stack.sh exit trap"

Jenkins authored on 2014/03/22 06:12:25
Showing 1 changed files
... ...
@@ -595,7 +595,9 @@ trap exit_trap EXIT
595 595
 function exit_trap {
596 596
     local r=$?
597 597
     jobs=$(jobs -p)
598
-    if [[ -n $jobs ]]; then
598
+    # Only do the kill when we're logging through a process substitution,
599
+    # which currently is only to verbose logfile
600
+    if [[ -n $jobs && -n "$LOGFILE" && "$VERBOSE" == "True" ]]; then
599 601
         echo "exit_trap: cleaning up child processes"
600 602
         kill 2>&1 $jobs
601 603
     fi