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

Re: Deadlock when receiving kill-signal from child process



On Aug 5,  7:05pm, Mathias Fredriksson wrote:
}
} The freezes are now much less frequent, but I still managed to get it
} to lock up with a slightly different gdb trace this time around.

Hm.  I'm a little puzzled by the continued appearance of the "no job
table entry" warning but this --

} #15 <signal handler called>
} #16 0x00007fff896dad62 in tiny_free_list_add_ptr ()
} #17 0x00007fff896d9e7f in szone_free_definite_size ()
} #18 0x000000010365e89a in inputsetline ()

-- is another case where we're manipulating global state without blocking
signal traps.


diff --git a/Src/input.c b/Src/input.c
index 1efabad..cabf942 100644
--- a/Src/input.c
+++ b/Src/input.c
@@ -377,6 +377,8 @@ inputline(void)
 static void
 inputsetline(char *str, int flags)
 {
+    queue_signals();
+
     if ((inbufflags & INP_FREE) && inbuf) {
 	free(inbuf);
     }
@@ -394,6 +396,8 @@ inputsetline(char *str, int flags)
     else
 	inbufct = inbufleft;
     inbufflags = flags;
+
+    unqueue_signals();
 }
 
 /*



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