about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/Src/exec.c b/Src/exec.c
index c5fac2fc9..49503db0f 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3345,6 +3345,12 @@ execfuncdef(Estate state, UNUSED(int do_exec))
 		return 1;
 	    }
 	    sigtrapped[signum] |= ZSIG_FUNC;
+
+	    /*
+	     * Remove the old node explicitly in case it has
+	     * an alternative name
+	     */
+	    removetrapnode(signum);
 	}
 	shfunctab->addnode(shfunctab, ztrdup(s), shf);
     }