Skip to content

Commit

Permalink
testsuite: escape shell variable
Browse files Browse the repository at this point in the history
Problem: a script generated in t2001-imp-kill.t via hereis
uses $! without escaping.

Add a backslash.
  • Loading branch information
garlick committed Sep 28, 2023
1 parent f285f61 commit 26d7886
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 @@ -174,7 +174,7 @@ test_expect_success NO_CHAIN_LINT,SUID_ENABLED,USER_CGROUP \
echo "\$@"
printf "\$PPID\n" >$(pwd)/sleeper.pid
/bin/sleep "\$@" &
pid=$! &&
pid=\$! &&
trap "echo got SIGTERM; kill \$pid" SIGTERM
wait
echo sleep exited with \$? >&2
Expand Down

0 comments on commit 26d7886

Please sign in to comment.