File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1003,8 +1003,11 @@ end_exit() {
10031003 # # Sleep less than a second so the file descriptors have enough time to
10041004 # # output all the logs to the screen before the background job is killed.
10051005 sleep 0.3
1006- # shellcheck disable=SC2086
1007- kill -9 -- " ${tail_pid} "
1006+ if kill -0 -- " ${tail_pid} " ; then
1007+ # # TODO: Check if this is really necessary.
1008+ # shellcheck disable=SC2086
1009+ kill -s sigterm -- " ${tail_pid} " || true
1010+ fi
10081011 fi
10091012
10101013 true " INFO: Show log file locations at end of xtrace."
@@ -1062,8 +1065,9 @@ handle_exit() {
10621065 else
10631066 if [ " ${last_exit} " -gt 128 ] && [ " ${last_exit} " -lt 193 ]; then
10641067 signal_code=$(( last_exit- 128 ))
1065- # # 'kill --list' does not support end-of-options.
1066- signal_caught=" $( kill --list " ${signal_code} " ) "
1068+ # # 'kill -l': Use short option name because 'kill' is a built-in and does not support long option name '--list'.
1069+ # # 'kill -l' does not support end-of-options.
1070+ signal_caught=" $( kill -l " ${signal_code} " ) "
10671071 log error " Signal received: '${signal_caught} '"
10681072 fi
10691073 fi
You can’t perform that action at this time.
0 commit comments