]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables-apply: Replace signal numbers by names
authorPhil Sutter <phil@nwl.cc>
Wed, 19 Sep 2018 13:16:58 +0000 (15:16 +0200)
committerFlorian Westphal <fw@strlen.de>
Mon, 24 Sep 2018 09:24:12 +0000 (11:24 +0200)
As covscan stated: "Trapping signals by number is not well defined.
Prefer signal names."

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Florian Westphal <fw@strlen.de>
iptables/iptables-apply

index c7b12d07e584bd949c8c076036fd8dccff75712c..819ca4a459c42016971fb08187c30b475a808968 100755 (executable)
@@ -123,7 +123,8 @@ done
 umask 0700
 
 TMPFILE=$(tempfile -p iptap)
-trap "rm -f $TMPFILE" EXIT 1 2 3 4 5 6 7 8 10 11 12 13 14 15
+trap "rm -f $TMPFILE" EXIT HUP INT QUIT ILL TRAP ABRT BUS \
+                     FPE USR1 SEGV USR2 PIPE ALRM TERM
 
 if ! "$SAVE" >"$TMPFILE"; then
        if ! grep -q ipt /proc/modules 2>/dev/null; then