bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Fix exit status of signal handlers in shell scripts


From: Bruno Haible
Subject: Re: [PATCH] Fix exit status of signal handlers in shell scripts
Date: Sun, 31 Jan 2010 01:56:40 +0100
User-agent: KMail/1.9.9

Dmitry V. Levin wrote:
> > -trap 'rm -fr $tmpfiles' 1 2 3 15
> > +trap 'rm -fr $tmpfiles; exit 77' 1 2 3 15
> 
> According to "Limitations of Builtins" chapter in the autoconf
> manual, plain "exit 77" is not portable; it has to be written
> as "(exit 77); exit 77".

Plain "exit 77" is not portable ONLY if the shell script has a 'trap'
handler installed for condition 0.

Said unit tests don't have a trap handler for condition 0.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]