[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
exit 130 behaviour -- bug?
From: |
epl |
Subject: |
exit 130 behaviour -- bug? |
Date: |
Thu, 24 Apr 2003 12:35:40 +1000 (EST) |
I noticed that bash behaves differently to other shells (proprietary
vendor-specific implementations of sh and csh) with the following command
sequence when ``exit 130'' is used.
===
$ echo A; `exit 130`; echo $?; echo B
A
===
For every other exit values (between 0-255 inclusive) of you get
something similar to:
===
$ echo A; `exit 1`; echo $?; echo B
A
1
B
===
Below 0 or above 255, it wrap mod 256. However, I remain unsure whether
this is an intentional behaviour related to some POSIX standard whereby
exit code == 128+n means that signal n has been received or a genuine bug.
I have found two relevant links on the net:
http://mail.gnu.org/archive/html/bug-bash/2003-01/msg00018.html
http://www.research.att.com/lists/shell/2001/09/msg00008.html
I have reproduced this bug on the following architectures/bash:
GNU bash, version 2.03.0(1)-release (sparc-sun-solaris)
GNU bash, version 2.04.0(1)-release (sparc-sun-solaris2.6)
GNU bash, version 2.04.0(1)-release (alpha-dec-osf4.0d)
GNU bash, version 2.04.0(1)-release (alpha-dec-osf5.1)
GNU bash, version 2.05a.0(1)-release (i686-pc-linux-gnu)
GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
GNU bash, version 2.05a.0(1)-release (i386-pc-linux-gnu)
Regards
Eddie
- exit 130 behaviour -- bug?,
epl <=