Mailing List Archive

[PATCH] applygnupgdefaults: Remove SIG prefix from signal names used in trap
From: Fedor Ross <fedor.ross@ifm.com>

In bourne shell, the SIG prefix is optional for signal names used with
trap built-in. For example in dash, signal names with SIG prefix are not
supported at all. Drop the SIG prefix to make the script compatible with
both bash, dash, and possibly other bourne shell implementations.

No functional change.

Signed-off-by: Fedor Ross <fedor.ross@ifm.com>
Signed-off-by: Marek Vasut <marex@denx.de>
---
tools/applygnupgdefaults | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/applygnupgdefaults b/tools/applygnupgdefaults
index 316509faf..60525a260 100755
--- a/tools/applygnupgdefaults
+++ b/tools/applygnupgdefaults
@@ -33,7 +33,7 @@ cleanup ()
{
[ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile"
}
-trap cleanup EXIT SIGINT SIGHUP SIGPIPE
+trap cleanup EXIT INT HUP PIPE
errorfile=$(mktemp "/tmp/$PGM.log.XXXXXX")
[ -n "$errorfile" -a -f "$errorfile" ] || exit 2

--
2.30.2


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel