diff options
author | Loïc Minier | 2010-09-25 21:52:30 +0200 |
---|---|---|
committer | Blue Swirl | 2010-09-26 08:57:32 +0200 |
commit | 0ba8681eee36af77109505c34b5e29da52fa51ba (patch) | |
tree | 31b71cf6b67cd9121d5bc10a1c2a7058c3bc91c1 /configure | |
parent | Introduce qemu_madvise() (diff) | |
download | qemu-0ba8681eee36af77109505c34b5e29da52fa51ba.tar.gz qemu-0ba8681eee36af77109505c34b5e29da52fa51ba.tar.xz qemu-0ba8681eee36af77109505c34b5e29da52fa51ba.zip |
Avoid exit in trap as it breaks with some shells
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>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 |