From d485facea2b930371db2001cfa20969ed1b9cf20 Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Fri, 19 Apr 2019 15:16:42 +0300 Subject: [PATCH] Revert "tools: toolchain: improve dbuild signal handing" This reverts commit 6c672e674b729bbed6f421ba462b355ce230a81e. It loses build logs, and the patch that restores logs causes build failures, so the whole thing needs to be revisited. --- tools/toolchain/dbuild | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/tools/toolchain/dbuild b/tools/toolchain/dbuild index 3461fd9b82..c744dca905 100755 --- a/tools/toolchain/dbuild +++ b/tools/toolchain/dbuild @@ -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"