1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-13 11:21:13 +02:00

queue_signals() to prevent adjustwinsize() loop on FreeBSD

This commit is contained in:
Bart Schaefer 2012-01-02 19:31:16 +00:00
parent ea7e24879f
commit bcd0fd1128
2 changed files with 21 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2012-01-02 Barton E. Schaefer <schaefer@zsh.org>
* 30073 (plus comment): Src/Zle/zle_main.c: use queue_signals()
around critical first call to zrefresh() after zleactive = 1, to
prevent adjustwinsize() loop reported on FreeBSD.
2011-12-30 Frank Terbeck <ft@bewatermyfriend.org> 2011-12-30 Frank Terbeck <ft@bewatermyfriend.org>
* 30048: Test/C02cond.ztst: Avoid [[ -N ... ]] on file-systems * 30048: Test/C02cond.ztst: Avoid [[ -N ... ]] on file-systems
@ -15804,5 +15810,5 @@
***************************************************** *****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL * This is used by the shell to define $ZSH_PATCHLEVEL
* $Revision: 1.5551 $ * $Revision: 1.5552 $
***************************************************** *****************************************************

View file

@ -1200,6 +1200,18 @@ zleread(char **lp, char **rp, int flags, int context)
putc('\r', shout); putc('\r', shout);
if (tmout) if (tmout)
alarm(tmout); alarm(tmout);
/*
* On some windowing systems we may enter this function before the
* terminal is fully opened and sized, resulting in an infinite
* series of SIGWINCH when the handler prints the prompt before we
* have done so here. Therefore, hold any such signal until the
* first full refresh has completed. The important bit is that the
* handler must not see zleactive = 1 until ZLE really is active.
* See the end of adjustwinsize() in Src/utils.c
*/
queue_signals();
zleactive = 1; zleactive = 1;
resetneeded = 1; resetneeded = 1;
errflag = retflag = 0; errflag = retflag = 0;
@ -1209,6 +1221,8 @@ zleread(char **lp, char **rp, int flags, int context)
zrefresh(); zrefresh();
unqueue_signals(); /* Should now be safe to acknowledge SIGWINCH */
zlecallhook("zle-line-init", NULL); zlecallhook("zle-line-init", NULL);
zlecore(); zlecore();