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

Re: Deadlock when receiving kill-signal from child process

On Aug 11,  1:53am, Mathias Fredriksson wrote:
} Well, scratch that. I went back to my original use case where I'm
} running commands in a zpty worker and notifying the original zsh pid
} that the work is done (previously through WINCH, now tested with
} USR1). There are usually two of these commands that are started at
} precmd and usually finish either before or shortly after the prompt is
} rendered. Now if I hold enter at and empty prompt, I can reproduce
} this deadlock very quickly.

Interesting.  I deliberately excluded preprompt() from the signal queue
in my init.c:loop() edit.  Try this:

diff --git a/Src/init.c b/Src/init.c
index f2021f0..22db4b3 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -127,9 +127,7 @@ loop(int toplevel, int justonce)
 		 * no matter what.
 		errflag = 0;
-		unqueue_signals();
-		queue_signals();
 		if (stophist != 3)

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