[Top][All Lists]
[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
pgpZ8cfhM2Dh4.pgp
Description: PGP signature
- [PATCH] Fix exit status of signal handlers in shell scripts, Dmitry V. Levin, 2010/01/30
- Re: [PATCH] Fix exit status of signal handlers in shell scripts, Bruno Haible, 2010/01/30
- Re: [PATCH] Fix exit status of signal handlers in shell scripts, Bruno Haible, 2010/01/30
- Re: [PATCH] Fix exit status of signal handlers in shell scripts, Bruno Haible, 2010/01/30
- Re: [PATCH] Fix exit status of signal handlers in shell scripts, Ralf Wildenhues, 2010/01/31