Skip to content

Commit

Permalink
timeout.test: fix test for systems that don't have bash.
Browse files Browse the repository at this point in the history
(Such as Android.)
  • Loading branch information
enh-google authored and landley committed Jul 22, 2022
1 parent ee00e1b commit a41bbf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/timeout.test
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ testcmd "--preserve-status killed" '--preserve-status -s 9 .1 sleep 100 ; echo $
# There's another special case where if the subprocess catches our timeout
# signal and exits, we need to report that as a timeout (unless overridden).
cat > loop.sh <<EOF
#!/bin/bash
#!/bin/sh
trap "exit 3" SIGTERM
while true; do
:
Expand Down

1 comment on commit a41bbf8

@E5ten
Copy link
Contributor

@E5ten E5ten commented on a41bbf8 Jul 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is supposed to work with a non-bash shell, SIGTERM should be changed to TERM to be POSIX compliant, so that it will work with any /bin/sh, as long as it is a POSIX one.

Please sign in to comment.