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

Re: zsh-4.3.1[45] problem on FreeBSD

On Jan 1,  3:25pm, Herbert J. Skuhra wrote:
} Subject: Re: zsh-4.3.1[45] problem on FreeBSD
} On Tue, 27 Dec 2011 16:53:15 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > Out of curiosity, what happens if you put a "sleep 5" somewhere in
} > your init files?  I'm wondering if there's some kind of race between
} > the terminal getting opened and the first attempt to output something.
} Adding a "sleep x" (x >= 0) to ~/.zshrc does indeed help.

Ahh, with that bit of data everything else makes a lot more sense.

Unfortunately I'm not entirely sure what to do about it.  In order for
the the ZLE_CMD_RESET_PROMPT change to have made a difference to the
behavior, the SIGWINCH must be arriving after zleread() is called for
the first time, because that's where zleactive gets set to 1, but it
isn't possible to tell exactly where in zleread() that happens.

Try the patch below (with the "sleep" removed from .zshrc) and let us
know if it resolves the problem?

If it does, I wonder if we should just queue_signals()/unqueue_signals()
around the entire body of zrefresh(), always?  Or is this the only place
that's important?  (And is it important to protect initmodifier() too?
[one line below the context shown in the first hunk of this patch])

Index: zle_main.c
RCS file: /extra/cvsroot/zsh/zsh-4.0/Src/Zle/zle_main.c,v
retrieving revision 1.39
diff -c -r1.39 zle_main.c
--- zle_main.c	20 Dec 2011 17:13:38 -0000	1.39
+++ zle_main.c	1 Jan 2012 20:05:30 -0000
@@ -1200,6 +1200,9 @@
 	putc('\r', shout);
     if (tmout)
+    queue_signals();
     zleactive = 1;
     resetneeded = 1;
     errflag = retflag = 0;
@@ -1208,6 +1211,7 @@
     prefixflag = 0;
+    unqueue_signals();
     zlecallhook("zle-line-init", NULL);

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