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.
This commit is contained in:
parent
ac3c9ba95d
commit
c00a51f4c8
|
@ -48,13 +48,13 @@ TEST=""
|
||||||
|
|
||||||
clean_exit() {
|
clean_exit() {
|
||||||
rc=$?
|
rc=$?
|
||||||
trap - SIGINT SIGTERM SIGABRT EXIT
|
trap - INT TERM ABRT EXIT
|
||||||
if [ "x$TEST" != "x" ]; then
|
if [ "x$TEST" != "x" ]; then
|
||||||
echo "Aborting from '$TEST' with the exit code $rc"
|
echo "Aborting from '$TEST' with the exit code $rc"
|
||||||
fi
|
fi
|
||||||
exit $rc
|
exit $rc
|
||||||
}
|
}
|
||||||
trap clean_exit SIGINT SIGTERM SIGABRT EXIT
|
trap clean_exit INT TERM ABRT EXIT
|
||||||
|
|
||||||
check () {
|
check () {
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue