- fix signal handling, cannot use '' as there is no way to reset
authorMichael Schroeder <mls@suse.de>
Thu, 10 Dec 2009 15:45:40 +0000 (16:45 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 10 Dec 2009 15:45:40 +0000 (16:45 +0100)
  the signal handlers in bash

build

diff --git a/build b/build
index b585f87..5d3e884 100755 (executable)
--- a/build
+++ b/build
@@ -419,11 +419,12 @@ detect_vm_2nd_stage()
     fi
     if test $$ -eq 1 ; then
        # ignore special init signals if we're init
-       trap '' HUP
+       # we're using ' ' instead of '' so that the signal handlers
+       # are reset in the child processes
+       trap ' ' HUP TERM
        $0 "$@"
        cleanup_and_exit 1
     fi
-    trap - HUP
     echo "2nd stage started in virtual machine"
     BUILD_ROOT=/
     BUILD_DIR=/.build