| ... | ... |
@@ -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 |