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>
This commit is contained in:
Jeff King 2013-06-01 13:24:41 -04:00 коммит произвёл Junio C Hamano
Родитель 239222f587
Коммит e828908aa9
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -20,4 +20,11 @@ test_expect_success 'sigchain works' '
test_cmp expect actual 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 test_done