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: Dmitry V. Levin
Subject: Re: [PATCH] Fix exit status of signal handlers in shell scripts
Date: Sun, 31 Jan 2010 03:52:50 +0300

On Sun, Jan 31, 2010 at 01:41:33AM +0100, Bruno Haible wrote:
[...]
>  TMP_BASE=update-copyright.test
> -trap 'rm -f $TMP_BASE*' 0 1 2 3 15
> +trap 'status=$?; rm -f $TMP_BASE*; exit $status' 0
> +trap 'rm -f $TMP_BASE*; (exit 77); exit 77' 1 2 3 15

The signal trap is a bit redundant, it could be written as
trap '(exit 77); exit 77' 1 2 3 15


-- 
ldv

Attachment: pgpZ8cfhM2Dh4.pgp
Description: PGP signature


reply via email to

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