zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Herbert J. Skuhra" <hskuhra@fastmail.fm>,
	Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: zsh-4.3.1[45] problem on FreeBSD
Date: Sun, 01 Jan 2012 12:08:52 -0800	[thread overview]
Message-ID: <120101120852.ZM12005@torch.brasslantern.com> (raw)
In-Reply-To: <87d3b3v6sn.wl%hskuhra@fastmail.fm>

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@brasslantern.com> 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)
 	alarm(tmout);
+
+    queue_signals();
+
     zleactive = 1;
     resetneeded = 1;
     errflag = retflag = 0;
@@ -1208,6 +1211,7 @@
     prefixflag = 0;
 
     zrefresh();
+    unqueue_signals();
 
     zlecallhook("zle-line-init", NULL);
 


  reply	other threads:[~2012-01-01 20:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-26 20:01 Herbert J. Skuhra
2011-12-27  0:52 ` Herbert J. Skuhra
2011-12-27  2:31 ` Bart Schaefer
2011-12-27 20:38   ` Herbert J. Skuhra
2011-12-28  0:53     ` Bart Schaefer
2012-01-01 14:25       ` Herbert J. Skuhra
2012-01-01 20:08         ` Bart Schaefer [this message]
2012-01-02 11:38           ` Herbert J. Skuhra
2012-01-02 19:36             ` Bart Schaefer
2012-01-03 11:33               ` Herbert J. Skuhra
2012-01-11  9:20                 ` Baptiste Daroussin
2012-01-02 19:07           ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=120101120852.ZM12005@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=hskuhra@fastmail.fm \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).