]> Savannah Git Hosting - gnulib.git/commitdiff
In 'trap' commands, prefer symbolic to numeric signal names.
authorBruno Haible <bruno@clisp.org>
Sat, 26 Nov 2022 14:25:44 +0000 (15:25 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 26 Nov 2022 14:25:44 +0000 (15:25 +0100)
Reported by Mike Fulton <fultonm@ca.ibm.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.

* gnulib-tool: Use symbolic signal names.
* posix-modules: Likewise.
* MODULES.html.sh: Likewise.
* build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
* build-aux/csharpcomp.sh.in: Likewise.
* build-aux/gnu-web-doc-update: Likewise.
* top/autogen.sh: Likewise.
* top/bootstrap-funclib.sh: Likewise.
* top/gitsub.sh: Likewise.
* lib/t-idcache: Likewise.
* tests/havelib/rpath-1: Likewise.
* tests/havelib/rpath-2_a: Likewise.
* tests/havelib/rpath-2_b: Likewise.
* tests/havelib/rpath-3_a: Likewise.
* tests/havelib/rpath-3_b: Likewise.
* tests/init.sh: Likewise.
* tests/test-binary-io.sh: Likewise.
* tests/test-c-stack.sh: Likewise.
* tests/test-c-stack2.sh: Likewise.
* tests/test-dprintf-posix.sh: Likewise.
* tests/test-fpending.sh: Likewise.
* tests/test-fprintf-posix.sh: Likewise.
* tests/test-lseek.sh: Likewise.
* tests/test-printf-posix.sh: Likewise.
* tests/test-select-in.sh: Likewise.
* tests/test-select-out.sh: Likewise.
* tests/test-sigpipe.sh: Likewise.
* tests/test-tsearch.sh: Likewise.
* tests/test-update-copyright.sh: Likewise.
* tests/test-vdprintf-posix.sh: Likewise.
* tests/test-vfprintf-posix.sh: Likewise.
* tests/test-vprintf-posix.sh: Likewise.
* tests/test-xprintf-posix.sh: Likewise.
* tests/uniwidth/test-uc_width2.sh: Likewise.

35 files changed:
ChangeLog
MODULES.html.sh
build-aux/bootstrap
build-aux/csharpcomp.sh.in
build-aux/gnu-web-doc-update
gnulib-tool
lib/t-idcache
posix-modules
tests/havelib/rpath-1
tests/havelib/rpath-2_a
tests/havelib/rpath-2_b
tests/havelib/rpath-3_a
tests/havelib/rpath-3_b
tests/init.sh
tests/test-binary-io.sh
tests/test-c-stack.sh
tests/test-c-stack2.sh
tests/test-dprintf-posix.sh
tests/test-fpending.sh
tests/test-fprintf-posix.sh
tests/test-lseek.sh
tests/test-printf-posix.sh
tests/test-select-in.sh
tests/test-select-out.sh
tests/test-sigpipe.sh
tests/test-tsearch.sh
tests/test-update-copyright.sh
tests/test-vdprintf-posix.sh
tests/test-vfprintf-posix.sh
tests/test-vprintf-posix.sh
tests/test-xprintf-posix.sh
tests/uniwidth/test-uc_width2.sh
top/autogen.sh
top/bootstrap-funclib.sh
top/gitsub.sh

index 08efc65917b5aedfcc4a8cb80ef728d237e3d058..c0c1026711914c82340c9ae8d56dc1b3b7c2c456 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,43 @@
+2022-11-25  Bruno Haible  <bruno@clisp.org>
+
+       In 'trap' commands, prefer symbolic to numeric signal names.
+       Reported by Mike Fulton <fultonm@ca.ibm.com> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2022-11/msg00130.html>.
+       * gnulib-tool: Use symbolic signal names.
+       * posix-modules: Likewise.
+       * MODULES.html.sh: Likewise.
+       * build-aux/bootstrap (prepare_GNULIB_SRCDIR): Likewise.
+       * build-aux/csharpcomp.sh.in: Likewise.
+       * build-aux/gnu-web-doc-update: Likewise.
+       * top/autogen.sh: Likewise.
+       * top/bootstrap-funclib.sh: Likewise.
+       * top/gitsub.sh: Likewise.
+       * lib/t-idcache: Likewise.
+       * tests/havelib/rpath-1: Likewise.
+       * tests/havelib/rpath-2_a: Likewise.
+       * tests/havelib/rpath-2_b: Likewise.
+       * tests/havelib/rpath-3_a: Likewise.
+       * tests/havelib/rpath-3_b: Likewise.
+       * tests/init.sh: Likewise.
+       * tests/test-binary-io.sh: Likewise.
+       * tests/test-c-stack.sh: Likewise.
+       * tests/test-c-stack2.sh: Likewise.
+       * tests/test-dprintf-posix.sh: Likewise.
+       * tests/test-fpending.sh: Likewise.
+       * tests/test-fprintf-posix.sh: Likewise.
+       * tests/test-lseek.sh: Likewise.
+       * tests/test-printf-posix.sh: Likewise.
+       * tests/test-select-in.sh: Likewise.
+       * tests/test-select-out.sh: Likewise.
+       * tests/test-sigpipe.sh: Likewise.
+       * tests/test-tsearch.sh: Likewise.
+       * tests/test-update-copyright.sh: Likewise.
+       * tests/test-vdprintf-posix.sh: Likewise.
+       * tests/test-vfprintf-posix.sh: Likewise.
+       * tests/test-vprintf-posix.sh: Likewise.
+       * tests/test-xprintf-posix.sh: Likewise.
+       * tests/uniwidth/test-uc_width2.sh: Likewise.
+
 2022-11-20  Bruno Haible  <bruno@clisp.org>
 
        posix_spawn-internal: Avoid warning on macOS.
index d48912b13e7ad2d43abc72683535662bc4ac2700..02cfe32f06033cfc2c4bc921c14635a560fc0e3e 100755 (executable)
@@ -3627,15 +3627,15 @@ func_all_modules ()
 
 func_tmpdir
 trap 'exit_status=$?
-      if test "$signal" != 0; then
-        echo "caught signal $signal" >&2
+      if test "$signal" != EXIT; then
+        echo "caught signal SIG$signal" >&2
       fi
       rm -rf "$tmp"
-      exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+      exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
   trap '{ signal='$signal'; func_exit 1; }' $signal
 done
-signal=0
+signal=EXIT
 
 echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">'
 func_begin HTML
@@ -3736,8 +3736,8 @@ func_end HTML
 
 rm -rf "$tmp"
 # Undo the effect of the previous 'trap' command.
-trap '' 0
-trap 'func_exit $?' 1 2 3 13 15
+trap '' EXIT
+trap 'func_exit $?' HUP INT QUIT PIPE TERM
 
 exit 0
 
index a54c9957984e5cf3e1e47d5304bcacbfd9ed0c18..341d05d57e2b0f3e8f15b1649fd4a94936cc545b 100755 (executable)
@@ -540,7 +540,7 @@ prepare_GNULIB_SRCDIR ()
       elif [ ! -d "$gnulib_path" ]; then
         echo "$0: getting gnulib files..."
 
-        trap cleanup_gnulib 1 2 13 15
+        trap cleanup_gnulib HUP INT PIPE TERM
 
         shallow=
         if test -z "$GNULIB_REVISION"; then
@@ -570,7 +570,7 @@ prepare_GNULIB_SRCDIR ()
           git -C "$gnulib_path" reset --hard FETCH_HEAD
         fi
 
-        trap - 1 2 13 15
+        trap - HUP INT PIPE TERM
       fi
     fi
     GNULIB_SRCDIR=$gnulib_path
index 1a690e0a7a9f0b8fba07fc0b9fb054453165e29d..63b5a7013ce1071e90c9afd9cd0b89a1a71804c5 100644 (file)
@@ -127,7 +127,7 @@ if test -n "@HAVE_MCS@"; then
 /^Compilation succeeded/d
 }'
   func_tmpdir
-  trap 'rm -rf "$tmp"' 1 2 3 15
+  trap 'rm -rf "$tmp"' HUP INT QUIT TERM
   test -z "$CSHARP_VERBOSE" || echo mcs $options_mcs $sources
   mcs $options_mcs $sources > "$tmp"/mcs.err
   result=$?
index c041364fbe329298d872ec7397b392227165131d..28a0e97ef40ae9ac4b795650866935029ceefabe 100755 (executable)
@@ -153,8 +153,8 @@ cleanup()
   $GIT branch -d $tmp_branch
   exit $__st
 }
-trap cleanup 0
-trap 'exit $?' 1 2 13 15
+trap cleanup EXIT
+trap 'exit $?' HUP INT PIPE TERM
 
 # We must build using sources for which --version reports the
 # just-released version number, not some string like 7.6.18-20761.
index 028bcf36ade3bbca22cea05735694edb6c0c80e3..b0126e711a7e730d64a41dc238d93b2760e90156 100755 (executable)
@@ -1693,15 +1693,15 @@ func_determine_path_separator
 func_gnulib_dir
 func_tmpdir
 trap 'exit_status=$?
-      if test "$signal" != 0; then
-        echo "caught signal $signal" >&2
+      if test "$signal" != EXIT; then
+        echo "caught signal SIG$signal" >&2
       fi
       rm -rf "$tmp"
-      exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+      exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
   trap '{ signal='$signal'; func_exit 1; }' $signal
 done
-signal=0
+signal=EXIT
 
 # Note: The 'eval' silences stderr output in dash.
 if (declare -A x && { x[f/2]='foo'; x[f/3]='bar'; eval test '${x[f/2]}' = foo; }) 2>/dev/null; then
@@ -7676,12 +7676,13 @@ fi
 
 rm -rf "$tmp"
 # Undo the effect of the previous 'trap' command. Some shellology:
-# We cannot use "trap - 0 1 2 3 13 15", because Solaris sh would attempt to
-# execute the command "-". "trap '' ..." is fine only for signal 0 (= normal
-# exit); for the others we need to call 'exit' explicitly. The value of $? is
-# 128 + signal number and is set before the trap-registered command is run.
-trap '' 0
-trap 'func_exit $?' 1 2 3 13 15
+# We cannot use "trap - EXIT HUP INT QUIT PIPE TERM", because Solaris sh would
+# attempt to execute the command "-". "trap '' ..." is fine only for signal EXIT
+# (= normal exit); for the others we need to call 'exit' explicitly. The value
+# of $? is 128 + signal number and is set before the trap-registered command is
+# run.
+trap '' EXIT
+trap 'func_exit $?' HUP INT QUIT PIPE TERM
 
 exit 0
 
index e4d71af0a2b236661200c2bebf255c378c5c7ddf..0a08d49b42d5223da393c01fc2dba7326e069e4c 100755 (executable)
@@ -4,8 +4,8 @@
 
 pwd=`pwd`
 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
-trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' 0
-trap '(exit $?); exit $?' 1 2 13 15
+trap 'status=$?; cd "$pwd" && chmod -R u+rwx $t0 && rm -rf $t0 && exit $status' EXIT
+trap '(exit $?); exit $?' HUP INT PIPE TERM
 
 srcdir=../..
 framework_failure=0
index 462916157196a0f1b114637ea2936d50cf8716f2..18515385134b906c7b0dab04ddf34422a201d7bb 100755 (executable)
@@ -263,15 +263,15 @@ done
 func_gnulib_dir
 func_tmpdir
 trap 'exit_status=$?
-      if test "$signal" != 0; then
-        echo "caught signal $signal" >&2
+      if test "$signal" != EXIT; then
+        echo "caught signal SIG$signal" >&2
       fi
       rm -rf "$tmp"
-      exit $exit_status' 0
-for signal in 1 2 3 13 15; do
+      exit $exit_status' EXIT
+for signal in HUP INT QUIT PIPE TERM; do
   trap '{ signal='$signal'; func_exit 1; }' $signal
 done
-signal=0
+signal=EXIT
 
 (
   # Get the header modules.
index 2d14f04546bd21dae5786d20d6719793991ba3c7..821c304296f38cc63851bdea807a301563dd0eb1 100644 (file)
@@ -1,7 +1,7 @@
 # Common portion of all rpath-1* tests.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 builddir=`pwd`
 global_top_auxdir=`cd "$top_srcdir"/build-aux && pwd`
index 3570e44441a8aca0beb893ea0579f061186d8508..25fcb9e95f249fe4779890c954ec4732dfada4d3 100644 (file)
@@ -1,7 +1,7 @@
 # Common portion of all rpath-2?a? tests.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 builddir=`pwd`
 global_top_auxdir=`cd "$top_srcdir"/build-aux && pwd`
index e851d0190d8e0894b79032374221a22fc32dfc27..827e611b75a6cf67ae112da287f8c2fbb49af873 100644 (file)
@@ -1,7 +1,7 @@
 # Common portion of all rpath-2?b? tests.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 builddir=`pwd`
 global_top_auxdir=`cd "$top_srcdir"/build-aux && pwd`
index 6ccc3f8683598706fd34052be4f3a4fb31233c03..d7602432041fa145581898d776d7d120451f4c1d 100644 (file)
@@ -1,7 +1,7 @@
 # Common portion of all rpath-3?a? tests.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 builddir=`pwd`
 global_top_auxdir=`cd "$top_srcdir"/build-aux && pwd`
index 71b42128810fcd628fc3dccdcbaf4e4b1ae5183c..fcdfbe63b064968ddbfe934fec85ff060a37dda1 100644 (file)
@@ -1,7 +1,7 @@
 # Common portion of all rpath-3?b? tests.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 builddir=`pwd`
 global_top_auxdir=`cd "$top_srcdir"/build-aux && pwd`
index d5d37c98f8c4e8479d107b1a60e4fbf10453d72e..7d6afd16e2794c917a7e020d4ac25aa252f9ca2a 100644 (file)
@@ -702,4 +702,4 @@ test -f "$srcdir/init.cfg" \
 setup_ "$@"
 # This trap is here, rather than in the setup_ function, because some
 # shells run the exit trap at shell function exit, rather than script exit.
-trap remove_tmp_ 0
+trap remove_tmp_ EXIT
index a177d9473fb4dee4d5ef5fe9073cbb85f298d505..7bc5aa07f4baaa249ed96ca5188e373e8f44e17e 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-bin-out0.tmp t-bin-out1.tmp"
 ${CHECKER} ./test-binary-io${EXEEXT} 1 > t-bin-out1.tmp || exit 1
index 54009d3c01d0fc5bccb87695167bdc5b79db2220..f0bec55e324e4197978fbc8b12276ca12169d4fe 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="t-c-stack.tmp"
 ${CHECKER} ./test-c-stack${EXEEXT} 2> t-c-stack.tmp
index 7f035933f86eb2e3a295a9c0ae980f78ab58c935..b7f8b26bd94757a391511b74488ca0f1b3cdaf35 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="t-c-stack2.tmp"
 
index 188ebe5592c3891708f89b3513e1807dca5875ff..cee608ddbc1440abf0f82673cdcde8ada649909b 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-dprintf-posix.tmp t-dprintf-posix.out"
 ${CHECKER} ./test-dprintf-posix${EXEEXT} > t-dprintf-posix.tmp || exit 1
index abe7d83b99c5d05dd9e65f4ab75dff531b34113c..4acd60a9f577f371b74873bc51540d5d0f7ba1ed 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfile=
-trap 'rm -fr $tmpfile' 1 2 3 15
+trap 'rm -fr $tmpfile' HUP INT QUIT TERM
 
 tmpfile=test-fpending.t
 
index 5391ee0b7b87fecbaf1505f1760bb003c92d62b3..b4948b72ef052f97b3d85bbb1de3b1e66c8f6fc0 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-fprintf-posix.tmp t-fprintf-posix.out"
 ${CHECKER} ./test-fprintf-posix${EXEEXT} > t-fprintf-posix.tmp || exit 1
index ff206c66c7333db9bcc671df891e0334da3b71c7..ff553c93b29e51d784714644c47f7461ec54178f 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles=t-lseek.tmp
 # seekable files
index 3ac993a2e9478c988db7208843ecafb1919312fd..480bfdb430d8bcdd45338fe127537e3110056632 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-printf-posix.tmp t-printf-posix.out"
 ${CHECKER} ./test-printf-posix${EXEEXT} > t-printf-posix.tmp || exit 1
index 68176d30597820b13a4f8b302ccd5b1f755aee8a..ad86ea252606a806314bf580ac5bc28d3163643c 100755 (executable)
@@ -5,7 +5,7 @@
 # of /dev/null.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-select-in.tmp"
 
index dbeace505e7e28c481fbb624f1f507a78a0780d9..cfa5e179578ae1405bdf3bee2ce0591f1f1b0b0b 100755 (executable)
@@ -2,7 +2,7 @@
 # Test select() on file descriptors opened for writing.
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-select-out.out t-select-out.tmp"
 
index 58a19acf7c59e6b7525d9c7ccbc00509e77005b4..5c87f6ed50467a00a45dc3439ba3c09f6843295d 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 # Test signal's default behaviour.
 tmpfiles="$tmpfiles t-sigpipeA.tmp"
index dfc80eed5f508592d0d3527a3e1d7cafd216d39b..28539bd80f3d6a4facec63e5404b50ffe74f36b2 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-tsearch.out"
 ${CHECKER} ./test-tsearch${EXEEXT} > t-tsearch.out 2>&1
index 29cf6e99a059a5b857b7f1b961d920e1426c519e..5fc9492117bd9ce9ac68dd708720f5de521cdfb7 100755 (executable)
@@ -28,7 +28,7 @@ PATH=$abs_aux_dir:$PATH
 export PATH
 
 TMP_BASE=update-copyright.test
-trap 'rm -f $TMP_BASE*' 0 1 2 3 15
+trap 'rm -f $TMP_BASE*' EXIT HUP INT QUIT TERM
 
 ## --------------------------------- ##
 ## Skip if user does not have perl.  ##
index a2616b3793168fb7e55ab43ffb2773870ab7c6a1..7fcfd50fac0455a27097f663ac437149f2761604 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-vdprintf-posix.tmp t-vdprintf-posix.out"
 ${CHECKER} ./test-vdprintf-posix${EXEEXT} > t-vdprintf-posix.tmp || exit 1
index d5453e3f9cfedb17bc67721eaf9ddb2e459c0a3e..0d0945e411b962d820410cb01a6e1b6ad81163c6 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-vfprintf-posix.tmp t-vfprintf-posix.out"
 ${CHECKER} ./test-vfprintf-posix${EXEEXT} > t-vfprintf-posix.tmp || exit 1
index 7e85eb2948b418f0de8586107464d79403f38755..c2625c44c402bfa7ace0f5f03bdfb3dbffbfcafa 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-vprintf-posix.tmp t-vprintf-posix.out"
 ${CHECKER} ./test-vprintf-posix${EXEEXT} > t-vprintf-posix.tmp || exit 1
index f46059fa11b92511f0c6eaae6160b16d0f768d22..35da74256a06ae431331b2b729302fb4974f18a1 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles t-xprintf-posix.tmp t-xprintf-posix.out"
 ${CHECKER} ./test-xprintf-posix${EXEEXT} > t-xprintf-posix.tmp || exit 1
index 2833aef189a31d5b057fad039345af8663669150..ae6f8f45948bbdf98ed7f00ac2bddf9ee0436b24 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
+trap 'rm -fr $tmpfiles' HUP INT QUIT TERM
 
 tmpfiles="$tmpfiles uc_width.out"
 ${CHECKER} ./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out
index 02028f272b9d25be71181c2d882d346442657862..81db3fe035807881bb4b77518d48b5f764f64999 100755 (executable)
@@ -305,7 +305,7 @@ grep '^[     ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
 if test $with_gettext = yes || test $use_libtool = 1; then
 
   tempbase=.bootstrap$$
-  trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
+  trap "rm -f $tempbase.0 $tempbase.1" HUP INT PIPE TERM
 
   > $tempbase.0 > $tempbase.1 &&
   find . ! -type d -print | sort > $tempbase.0 || exit
@@ -348,7 +348,7 @@ if test $with_gettext = yes || test $use_libtool = 1; then
   IFS=$old_IFS
 
   rm -f $tempbase.0 $tempbase.1
-  trap - 1 2 13 15
+  trap - HUP INT PIPE TERM
 fi
 
 # Import from gnulib.
index f66f338c5aaec6ee500a9c6c760bef2d6b1474a3..cfad85a318eacc1d5e30430ef9765e16e7e32cc7 100644 (file)
@@ -501,7 +501,7 @@ prepare_GNULIB_SRCDIR ()
       elif [ ! -d "$gnulib_path" ]; then
         echo "$0: getting gnulib files..."
 
-        trap cleanup_gnulib 1 2 13 15
+        trap cleanup_gnulib HUP INT PIPE TERM
 
         shallow=
         if test -z "$GNULIB_REVISION"; then
@@ -531,7 +531,7 @@ prepare_GNULIB_SRCDIR ()
           git -C "$gnulib_path" reset --hard FETCH_HEAD
         fi
 
-        trap - 1 2 13 15
+        trap - HUP INT PIPE TERM
       fi
     fi
     GNULIB_SRCDIR=$gnulib_path
index 9a813cf7ba458a09540c7409a4f1bc1fe8de912e..54c52a874f2d3409d8c9ec870f6f0c370b1d66e8 100755 (executable)
@@ -354,9 +354,9 @@ func_pull ()
         fi
       else
         # The subdir does not yet exist. Create a plain checkout.
-        trap func_cleanup_current_git_clone 1 2 13 15
+        trap func_cleanup_current_git_clone HUP INT PIPE TERM
         git clone $2 "$url" "$path" || func_cleanup_current_git_clone
-        trap - 1 2 13 15
+        trap - HUP INT PIPE TERM
       fi
       ;;
     esac