]> git.proxmox.com Git - mirror_qemu.git/commitdiff
Avoid exit in trap as it breaks with some shells
authorLoïc Minier <loic.minier@linaro.org>
Sat, 25 Sep 2010 19:52:30 +0000 (21:52 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sun, 26 Sep 2010 06:57:32 +0000 (06:57 +0000)
Don't call exit in the trap handler as it causes the return code to be
zero with some buggy shells (dash and pdksh at least) and is useless
here anyway.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
configure

index 6a21bf2a1ff620e45faa51bc244d021fa5c8a8f8..02bda640cfe96377b3a48a8a79cbb4dffb8dd7ca 100755 (executable)
--- a/configure
+++ b/configure
@@ -15,7 +15,9 @@ TMPC="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.c"
 TMPO="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.o"
 TMPE="${TMPDIR1}/qemu-conf-${RANDOM}-$$-${RANDOM}.exe"
 
-trap "rm -f $TMPC $TMPO $TMPE ; exit" EXIT INT QUIT TERM
+# NB: do not call "exit" in the trap handler; this is buggy with some shells;
+# see <1285349658-3122-1-git-send-email-loic.minier@linaro.org>
+trap "rm -f $TMPC $TMPO $TMPE" EXIT INT QUIT TERM
 
 compile_object() {
   $cc $QEMU_CFLAGS -c -o $TMPO $TMPC > /dev/null 2> /dev/null