Skip to content

Commit

Permalink
testsuite: fix trap statement
Browse files Browse the repository at this point in the history
Problem: a script generated in t2001-imp-kill.t with a shebang
invoking /bin/sh includes a trap statement referencing SIGTERM,
but this fails with "trap: SIGTERM: bad trap"

s/SIGTERM/TERM/

Fixes #177
  • Loading branch information
garlick committed Sep 28, 2023
1 parent 26d7886 commit 493dba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t2001-imp-kill.t
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ test_expect_success NO_CHAIN_LINT,SUID_ENABLED,USER_CGROUP \
printf "\$PPID\n" >$(pwd)/sleeper.pid
/bin/sleep "\$@" &
pid=\$! &&
trap "echo got SIGTERM; kill \$pid" SIGTERM
trap "echo got SIGTERM; kill \$pid" TERM
wait
echo sleep exited with \$? >&2
EOF
Expand Down

0 comments on commit 493dba2

Please sign in to comment.