From: Jonathan Nieder <hidden> Date: 2016-06-15 22:49:06
Hi,
I can’t seem to get test-sigchain to run with ksh93 on linux:
$ ksh
ksh>$ ../bin-wrappers/test-sigchain
three
two
one
Terminated
ksh>$ echo $?
271
ksh>$ exit
$ ../bin-wrappers/test-sigchain
three
two
one
Terminated
$ echo $?
143
As a result, t0005-signals.sh fails when run through that
shell. Ideas?
$ ksh t0005-signals.sh -v
Initialized empty Git repository in /dev/shm/alt-git/t/trash directory.t0005-signals/.git/
expecting success:
[...]
test_cmp expect actual
not ok - 1 sigchain works
[...]
$ git describe
v1.7.2-rc2
$ ksh --version
version sh (AT&T Research) 93s+ 2008-01-31
$ uname -s -r -m
Linux 2.6.26-2-686-bigmem i686
From: Johannes Sixt <hidden> Date: 2016-06-15 22:49:06
From: Johannes Sixt <redacted>
ksh is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells. (ksh's behavior is still POSIX compliant in this regard.)
Signed-off-by: Johannes Sixt <redacted>
---
Am 7/9/2010 5:08, schrieb Jonathan Nieder:
I can’t seem to get test-sigchain to run with ksh93 on linux:
$ ksh
ksh>$ ../bin-wrappers/test-sigchain
three
two
one
Terminated
ksh>$ echo $?
271
From: Jeff King <hidden> Date: 2016-06-15 22:49:06
On Fri, Jul 09, 2010 at 09:05:16AM +0200, Johannes Sixt wrote:
From: Johannes Sixt <redacted>
ksh is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells. (ksh's behavior is still POSIX compliant in this regard.)
Thanks, that fix looks good to me.
Acked-by: Jeff King <redacted>
-Peff
From: Jonathan Nieder <hidden> Date: 2016-06-15 22:49:06
Johannes Sixt wrote:
ksh is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells. (ksh's behavior is still POSIX compliant in this regard.)
This patch works for me.
$ ksh t0005-signals.sh
* ok 1: sigchain works
* passed all 1 test(s)
Thanks for the explanation.
From: Johannes Sixt <redacted>
ksh is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells. (ksh's behavior is still POSIX compliant in this regard.)
This may only be true for Ksh93. The Ksh88 man page says that
the exit status is 128+signum. The Public domain Korn shell, and
ksh on IRIX 6.5, Solaris 7, 9, and 10 all exit with the standard
behavior of 128+signum. So, it may be appropriate to change the
commit message and comment in t0005 to reflect this fact.
-Brandon
On Fri, Jul 9, 2010 at 15:45, Brandon Casey
[off-list ref] wrote:
the exit status is 128+signum. The Public domain Korn shell, and
ksh on IRIX 6.5, Solaris 7, 9, and 10 all exit with the standard
behavior of 128+signum. So, it may be appropriate to change the
commit message and comment in t0005 to reflect this fact.
On 07/09/2010 11:03 AM, Ævar Arnfjörð Bjarmason wrote:
On Fri, Jul 9, 2010 at 15:45, Brandon Casey
[off-list ref] wrote:
quoted
the exit status is 128+signum. The Public domain Korn shell, and
ksh on IRIX 6.5, Solaris 7, 9, and 10 all exit with the standard
behavior of 128+signum. So, it may be appropriate to change the
commit message and comment in t0005 to reflect this fact.
From: Johannes Sixt <hidden> Date: 2016-06-15 22:49:07
From: Johannes Sixt <redacted>
ksh93 is known to report $? of programs that terminated by a signal as
256 + signal number instead of 128 + signal number like other POSIX
compliant shells. (ksh's behavior is still POSIX compliant in this regard.)
Signed-off-by: Johannes Sixt <redacted>
Acked-by: Jeff King <redacted>
---
Am 7/9/2010 17:45, schrieb Brandon Casey:
This may only be true for Ksh93. The Ksh88 man page says that
the exit status is 128+signum. The Public domain Korn shell, and
ksh on IRIX 6.5, Solaris 7, 9, and 10 all exit with the standard
behavior of 128+signum.
Thanks for you input!
Hannes
t/t0005-signals.sh | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)