All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org, Jeff King <peff@peff.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2] t0005: work around strange $? in ksh93 when program terminated by a signal
Date: Mon, 12 Jul 2010 08:41:13 +0200	[thread overview]
Message-ID: <4C3AB909.80205@viscovery.net> (raw)
In-Reply-To: <iOZX7rvipLDwT5DTYGPE0q9TlJfav09nJWqaRsyiefjNds9DpaDw1A@cipher.nrlssc.navy.mil>

From: Johannes Sixt <j6t@kdbg.org>

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 <j6t@kdbg.org>
Acked-by: Jeff King <peff@peff.net>
---
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(-)

diff --git a/t/t0005-signals.sh b/t/t0005-signals.sh
index 09f855a..e17c96a 100755
--- a/t/t0005-signals.sh
+++ b/t/t0005-signals.sh
@@ -13,6 +13,7 @@ test_expect_success 'sigchain works' '
 	test-sigchain >actual
 	case "$?" in
 	143) true ;; # POSIX w/ SIGTERM=15
+	271) true ;; # ksh93 w/ SIGTERM=15
 	  3) true ;; # Windows
 	  *) false ;;
 	esac &&
-- 
1.7.1.585.gf3448

  parent reply	other threads:[~2010-07-12  6:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09  3:08 t0005 failing with ksh93 on linux Jonathan Nieder
2010-07-09  7:05 ` [PATCH] t0005: work around strange $? in ksh when program terminated by a signal Johannes Sixt
2010-07-09 11:53   ` Jeff King
2010-07-09 14:39   ` Jonathan Nieder
2010-07-09 15:45   ` Brandon Casey
2010-07-09 16:03     ` Ævar Arnfjörð Bjarmason
2010-07-09 16:07       ` Brandon Casey
2010-07-12  6:41     ` Johannes Sixt [this message]
2010-07-12  6:47       ` [PATCH v2] t0005: work around strange $? in ksh93 " Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C3AB909.80205@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=brandon.casey.ctr@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.