Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: empty trap coredump



% trap '' 1
zsh: segmentation fault  /bin/zsh

The fix below come from Akim Demaille <akim@xxxxxxxx> though I'm sending it.

Index: Src/builtin.c
--- Src/builtin.c Sun, 06 Feb 2000 11:06:18 +0100 Alexandre
+++ Src/builtin.c Wed, 09 Feb 2000 11:15:22 +0100 Alexandre
@@ -3883,7 +3883,7 @@
     /* Sort out the command to execute on trap */
     arg = *argv++;
     if (!*arg)
-	prog = NULL;
+	prog = &dummy_eprog;
     else if (!(prog = parse_string(arg, 0))) {
 	zwarnnam(name, "couldn't parse trap command", NULL, 0);
 	return 1;


-- 
Alexandre Duret-Lutz



Messages sorted by: Reverse Date, Date, Thread, Author