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

Re: precmd: write error: interrupted



On 04/28/2013 12:31 AM, Bart Schaefer wrote:
What you've been reporting is almost certainly another variation of the
same bug.  So maybe all we really need is this (plus some #ifdef):

diff --git a/Src/utils.c b/Src/utils.c
index 26e2a5c..a20a5e1 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1323,7 +1323,9 @@ preprompt(void)

      /* If a shell function named "precmd" exists, *
       * then execute it.                           */
+    signal_block(signal_mask(SIGWINCH));  /* See zleread() */
      callhookfunc("precmd", NULL, 1, NULL);
+    signal_unblock(signal_mask(SIGWINCH));
      if (errflag)
         return;

This is going to solve the issue for "precmd" only though, not the SIGWHINCH issue as a whole.

You can still arbitrarily stop the example loop I shown before by resizing the terminal window.



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