mirror of
https://github.com/git/git.git
synced 2024-11-01 06:47:52 +01:00
0e418e568f
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
23 lines
341 B
Bash
Executable file
23 lines
341 B
Bash
Executable file
#!/bin/sh
|
|
|
|
test_description='signals work as we expect'
|
|
. ./test-lib.sh
|
|
|
|
cat >expect <<EOF
|
|
three
|
|
two
|
|
one
|
|
EOF
|
|
|
|
test_expect_success 'sigchain works' '
|
|
test-sigchain >actual
|
|
case "$?" in
|
|
143) true ;; # POSIX w/ SIGTERM=15
|
|
271) true ;; # ksh w/ SIGTERM=15
|
|
3) true ;; # Windows
|
|
*) false ;;
|
|
esac &&
|
|
test_cmp expect actual
|
|
'
|
|
|
|
test_done
|