Skip to content

Commit 348e241

Browse files
committed
build
1 parent ae6bded commit 348e241

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

usr/share/usability-misc/dist-installer-cli-standalone

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)