summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2022-11-26 17:37:33 +0100
committerBruno Haible <bruno@clisp.org>2022-11-26 17:37:33 +0100
commitc308fd01b5183dcfb7156d8f05dc67649f9a51a7 (patch)
tree44eaa397a8e57e76e8a1d3458a8df3b8a6a5b254
parente21904361e979740ad6a36fe8feb2e20baa0e4b1 (diff)
downloadlibunistring-c308fd01b5183dcfb7156d8f05dc67649f9a51a7.tar.gz
In 'trap' commands, prefer symbolic to numeric signal names.
-rwxr-xr-xAdmin/containing12
-rwxr-xr-xAdmin/dependent12
-rwxr-xr-xAdmin/gen-uni-tables12
-rwxr-xr-xAdmin/gen-uninames12
4 files changed, 24 insertions, 24 deletions
diff --git a/Admin/containing b/Admin/containing
index d6f5e91..57841a7 100755
--- a/Admin/containing
+++ b/Admin/containing
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -62,15 +62,15 @@ func_tmpdir ()
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
sed_literal_to_basic_regex='s/\\/\\\\/g
s/\[/\\[/g
diff --git a/Admin/dependent b/Admin/dependent
index 58e4ceb..e242eb3 100755
--- a/Admin/dependent
+++ b/Admin/dependent
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -62,15 +62,15 @@ func_tmpdir ()
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
sed_literal_to_basic_regex='s/\\/\\\\/g
s/\[/\\[/g
diff --git a/Admin/gen-uni-tables b/Admin/gen-uni-tables
index d86787a..e6cd7dc 100755
--- a/Admin/gen-uni-tables
+++ b/Admin/gen-uni-tables
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -79,15 +79,15 @@ test -n "$UCD" || \
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
# Compile lib/gen-uni-tables.c in a temporary directory
: ${CC=gcc}
diff --git a/Admin/gen-uninames b/Admin/gen-uninames
index 795f418..af2999f 100755
--- a/Admin/gen-uninames
+++ b/Admin/gen-uninames
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2015-2021 Free Software Foundation, Inc.
+# Copyright (C) 2015-2022 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -79,15 +79,15 @@ test -n "$UCD" || \
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
: ${CLISP=clisp}
("$CLISP" --version) >/dev/null 2>/dev/null \