summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wagner <bungeman@chromium.org>2020-12-10 14:00:40 -0500
committerBen Wagner <bungeman@chromium.org>2020-12-10 14:00:40 -0500
commitc00a51f4c8ea7d548a069bc5e94a1aceabf5249a (patch)
tree44f57fa4063e1e9b30458904a8b6978d95e5a3c8
parentac3c9ba95db2657b20ea149011a1de7e435cb92c (diff)
Portable trap conditions in run-test.sh.
Posix says: The condition can be EXIT, 0 (equivalent to EXIT), or a signal specified using a symbolic name, without the SIG prefix, as listed in the tables of signal names in the <signal.h> header defined in the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 13, Headers; for example, HUP, INT, QUIT, TERM. Implementations may permit names with the SIG prefix or ignore case in signal names as an extension. Remove 'SIG' from trap conditions in run-test.sh for portability.
-rw-r--r--test/run-test.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/run-test.sh b/test/run-test.sh
index a46e9a7..34d9fc0 100644
--- a/test/run-test.sh
+++ b/test/run-test.sh
@@ -48,13 +48,13 @@ TEST=""
clean_exit() {
rc=$?
- trap - SIGINT SIGTERM SIGABRT EXIT
+ trap - INT TERM ABRT EXIT
if [ "x$TEST" != "x" ]; then
echo "Aborting from '$TEST' with the exit code $rc"
fi
exit $rc
}
-trap clean_exit SIGINT SIGTERM SIGABRT EXIT
+trap clean_exit INT TERM ABRT EXIT
check () {
{