summaryrefslogtreecommitdiff
path: root/t/t0005-signals.sh
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2013-06-01 17:24:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-02 20:47:54 (GMT)
commite828908aa97ce0441b0c00a640b314c041fbd9e2 (patch)
tree1bbefc9f03cad4ec7c3cbc1acbc8165fa4e94b82 /t/t0005-signals.sh
parent239222f587ed06f96d90dd71c66d80a2b1e3dc9f (diff)
downloadgit-e828908aa97ce0441b0c00a640b314c041fbd9e2.zip
git-e828908aa97ce0441b0c00a640b314c041fbd9e2.tar.gz
git-e828908aa97ce0441b0c00a640b314c041fbd9e2.tar.bz2
t0005: test git exit code from signal death
When a sub-process dies with a signal, we convert the exit code to the shell convention of 128+sig. Callers of git may be relying on this behavior, so let's make sure it does not break. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0005-signals.sh')
-rwxr-xr-xt/t0005-signals.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/t0005-signals.sh b/t/t0005-signals.sh
index 93e58c0..ad9e604 100755
--- a/t/t0005-signals.sh
+++ b/t/t0005-signals.sh
@@ -20,4 +20,11 @@ test_expect_success 'sigchain works' '
test_cmp expect actual
'
+test_expect_success 'signals are propagated using shell convention' '
+ # we use exec here to avoid any sub-shell interpretation
+ # of the exit code
+ git config alias.sigterm "!exec test-sigchain" &&
+ test_expect_code 143 git sigterm
+'
+
test_done