Revert "tools: toolchain: improve dbuild signal handing"

This reverts commit 6c672e674b. It loses
build logs, and the patch that restores logs causes build failures, so
the whole thing needs to be revisited.
This commit is contained in:
Avi Kivity
2019-04-19 15:16:42 +03:00
parent 0a874f1897
commit d485facea2

View File

@@ -21,9 +21,8 @@ if [[ "$1" = -* ]]; then
shift
fi
container=$(
docker run \
--detach=true \
docker run \
--sig-proxy=true \
--rm \
--network host \
-u "$(id -u):$(id -g)" \
@@ -39,23 +38,3 @@ container=$(
"${docker_args[@]}" \
"$(<"$here/image")" \
"$@"
)
kill_it() {
docker kill "$container" > /dev/null || :
}
trap kill_it SIGTERM SIGINT SIGHUP EXIT
exitcode="$(docker wait "$container")"
# Abnormal termination could result if "docker wait" was interrupted. Make extra sure
# that the container is dead.
kill_it
trap - SIGTERM SIGINT SIGHUP EXIT
# after "docker kill", docker wait will not print anything
[[ -z "$exitcode" ]] && exitcode=1
exit "$exitcode"