[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:29:00 +0300 |
On Sun, Jan 31, 2010 at 01:04:09AM +0100, Bruno Haible wrote:
[...]
> > Proposed patch is attached.
>
> Sorry, but I don't understand why you chose 143 as exit code, making it look
> like the process died from SIGTERM when in fact in may have been SIGINT.
> There seem to be two conventions for the exit code: either 128 + signal
> number,
> or 1.
>
> $ sleep 5
> ^C
> $ echo $?
> 130
> $ while /bin/true; do /bin/true; done
> ^C^C
> $ echo $?
> 1
>
> gnulib-tool and MODULES.html.sh use exit code 1 here. Why not?
Any non-zero exit code would be OK for most cases.
[...]
> For the tests, I am inclined to provide the exit
> code '77' (= SKIP), rather than '1' (= FAIL): If a test is terminated
> by Ctrl-C, it has neither passed nor failed.
Yes, it makes sense.
--
ldv
pgpDbRzXiUc_0.pgp
Description: PGP signature