From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14882 invoked by alias); 1 Jan 2012 20:09:08 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30073 Received: (qmail 19057 invoked from network); 1 Jan 2012 20:09:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120101120852.ZM12005@torch.brasslantern.com> Date: Sun, 01 Jan 2012 12:08:52 -0800 In-reply-to: <87d3b3v6sn.wl%hskuhra@fastmail.fm> Comments: In reply to "Herbert J. Skuhra" "Re: zsh-4.3.1[45] problem on FreeBSD" (Jan 1, 3:25pm) References: <1324929718.26691.140661016136941@webmail.messagingengine.com> <111226183140.ZM23495@torch.brasslantern.com> <877h1hn40t.wl%hskuhra@fastmail.fm> <87d3b3v6sn.wl%hskuhra@fastmail.fm> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Herbert J. Skuhra" , Zsh hackers list Subject: Re: zsh-4.3.1[45] problem on FreeBSD MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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 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);