From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20897 invoked by alias); 11 Aug 2015 00:53:52 -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: 36090 Received: (qmail 14727 invoked from network); 11 Aug 2015 00:53:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=RFfl8m++uRZKiWCfHObcpfFHWWrz+IT4LTLq4TizXYg=; b=ivSYPZbJIdz45onOk9aj+8ZVYubFnloJZrI3lQrv7ir9g3lWIDHmjfRNoDvH4F4Ga3 CWAAZUhRlm6EsUBt0F5npIPJPeRrjWJIiFRkVxYLR6k/b7TsnIjfTPqkuBYxKfceekrq S1/WQMybWr/fNYs7JM+06bY/w7d1oL0PyYHYnL7oVHrMnfM+It3bs0rLLiVvT2LoCtuj A9eFJ3z9t4CIVIhHoY9jnN8cUob7hIEtsIX3lYyQz9TgvideuZ4fMDsRcFjYfKQPwgaa sBdElvVqphqwI9W5HmDBLz3pQyLvLj0z0hL6l7VUnY8KMVrcjG6HNLrn+KgDVw2rS++s s3NA== X-Gm-Message-State: ALoCoQl6U0cbCHtfZ01hqG7eqlNU7C2XRzG9K9pounfzpK+qGWWWLzoihrqWhXc1nmCsXGtCilu7 X-Received: by 10.60.96.35 with SMTP id dp3mr23169847oeb.47.1439254427933; Mon, 10 Aug 2015 17:53:47 -0700 (PDT) From: Bart Schaefer Message-Id: <150810175343.ZM24452@torch.brasslantern.com> Date: Mon, 10 Aug 2015 17:53:43 -0700 In-Reply-To: Comments: In reply to Mathias Fredriksson "Re: Deadlock when receiving kill-signal from child process" (Aug 11, 1:53am) References: <150803085228.ZM24837@torch.brasslantern.com> <150803135818.ZM24977@torch.brasslantern.com> <150804235400.ZM9958@torch.brasslantern.com> <150805085258.ZM17673@torch.brasslantern.com> <150805115249.ZM7158@torch.brasslantern.com> <150805132014.ZM7746@torch.brasslantern.com> <150805220656.ZM18545@torch.brasslantern.com> <150806085451.ZM402@torch.brasslantern.com> <150806223906.ZM17762@torch.brasslantern.com> <150810123445.ZM1612@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Deadlock when receiving kill-signal from child process MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Aug 11, 1:53am, Mathias Fredriksson wrote: } } Well, scratch that. I went back to my original use case where I'm } running commands in a zpty worker and notifying the original zsh pid } that the work is done (previously through WINCH, now tested with } USR1). There are usually two of these commands that are started at } precmd and usually finish either before or shortly after the prompt is } rendered. Now if I hold enter at and empty prompt, I can reproduce } this deadlock very quickly. Interesting. I deliberately excluded preprompt() from the signal queue in my init.c:loop() edit. Try this: diff --git a/Src/init.c b/Src/init.c index f2021f0..22db4b3 100644 --- a/Src/init.c +++ b/Src/init.c @@ -127,9 +127,7 @@ loop(int toplevel, int justonce) * no matter what. */ errflag = 0; - unqueue_signals(); preprompt(); - queue_signals(); if (stophist != 3) hbegin(1); else