process-wrapper_test: use short signal names for trap
I.e., use names like INT TERM ALRM instead of SIGINT, SIGTERM, SIGALRM,
as the usage without the SIG prefix is more widely accepted by shells.
@@ -65,7 +65,7 @@ function test_signal_death() {
function test_signal_catcher() {
local code=0
$process_wrapper --timeout=1 --kill_delay=2 --stdout=$OUT --stderr=$ERR /bin/sh -c \
- 'trap "echo later; exit 0" SIGINT SIGTERM SIGALRM; sleep 10' &> $TEST_log || code=$?
+ 'trap "echo later; exit 0" INT TERM ALRM; sleep 10' &> $TEST_log || code=$?
assert_equals 142 "$code" # SIGNAL_BASE + SIGALRM = 128 + 14
assert_stdout "later"
}
@@ -83,7 +83,7 @@ function test_basic_timeout() {
function test_timeout_grace() {
local code=0
$process_wrapper --timeout=1 --kill_delay=10 --stdout=$OUT --stderr=$ERR /bin/sh -c \
- 'trap "echo before; sleep 1; echo after; exit 0" SIGINT SIGTERM SIGALRM; sleep 10' \
+ 'trap "echo before; sleep 1; echo after; exit 0" INT TERM ALRM; sleep 10' \
&> $TEST_log || code=$?
assert_equals 142 "$code" # SIGNAL_BASE + SIGALRM = 128 + 14
assert_stdout 'before
@@ -97,7 +97,7 @@ after'
function test_timeout_kill() {
local code=0
$process_wrapper --timeout=1 --kill_delay=2 --stdout=$OUT --stderr=$ERR /bin/sh -c \
- 'trap "echo before; sleep 10; echo after; exit 0" SIGINT SIGTERM SIGALRM; sleep 10' \
+ 'trap "echo before; sleep 10; echo after; exit 0" INT TERM ALRM; sleep 10' \
&> $TEST_log || code=$?
assert_equals 142 "$code" # SIGNAL_BASE + SIGALRM = 128 + 14
assert_stdout "before"
