Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-25 Thread Blue Swirl
On Sat, Sep 25, 2010 at 12:01 PM, Loïc Minier wrote: > On Sat, Sep 25, 2010, Blue Swirl wrote: >> It looks like dash and ksh are not compliant and use the return value >> of echo or rm inside trap handler: >> dash -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $? >> 4 > >  I've

Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-25 Thread Markus Armbruster
Loïc Minier writes: > On Sat, Sep 25, 2010, Blue Swirl wrote: >> It looks like dash and ksh are not compliant and use the return value >> of echo or rm inside trap handler: >> dash -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $? >> 4 > > I've filed https://bugs.launchpad.ne

Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-25 Thread Loïc Minier
On Sat, Sep 25, 2010, Blue Swirl wrote: > It looks like dash and ksh are not compliant and use the return value > of echo or rm inside trap handler: > dash -c 'trap "sh -c \"exit 4\"; exit" 0 1 2 3 9 11 13 15;exit 3'; echo $? > 4 I've filed https://bugs.launchpad.net/dash/+bug/647450 to track thi

Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-25 Thread Blue Swirl
On Sat, Sep 25, 2010 at 8:31 AM, Loïc Minier wrote: > On Sat, Sep 25, 2010, Markus Armbruster wrote: >> This suggests the old code screws up the exit code.  It doesn't for me. >> Unless it does at least on some platforms, it's a cleanup, not a fix, >> and the commit message should reflect that. >

Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-25 Thread Loïc Minier
On Sat, Sep 25, 2010, Markus Armbruster wrote: > This suggests the old code screws up the exit code. It doesn't for me. > Unless it does at least on some platforms, it's a cleanup, not a fix, > and the commit message should reflect that. It does screw up the exit code for me; it seems it's becau

Re: [Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-24 Thread Markus Armbruster
Loïc Minier writes: > When configure runs "exit 1", the trap handler is run to cleanup any > files created by configure, but this trap handler itself calls "exit" > with no argument (which means zero exit code): > [...] > + echo Error: zlib check failed > Error: zlib check failed > + echo Make su

[Qemu-devel] [PATCH] Don't exit with zero in the trap handler

2010-09-24 Thread Loïc Minier
When configure runs "exit 1", the trap handler is run to cleanup any files created by configure, but this trap handler itself calls "exit" with no argument (which means zero exit code): [...] + echo Error: zlib check failed Error: zlib check failed + echo Make sure to have the zlib libs and headers