From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19266 invoked by alias); 2 Sep 2015 02:14:51 -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: 36393 Received: (qmail 10908 invoked from network); 2 Sep 2015 02:14:49 -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=-1.9 required=5.0 tests=BAYES_00 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=CGsB8b9vkzJOUuRChCxgDyVHmlae61Kr/19TorBkXpA=; b=RP56KbaCmSNL+A9NZpGJer+XwPRWnZy9WS31NLTQnp2b9FLuCNbs0ecxqCKNYW03h1 SaIXeWiFgj6v4d1zYeljdxmwQuCIIDYEU0H+GZOeQDXJVUxnPoyNdrt9oKbSfnJFUdkI c6NK3M21CXzcOwItMjXchV+apLhr6TJaUEmZo4M9FB7JxdkWTJkt4oswKFOwZNeC6NJq exKVn01Z9Uq+VmhixI7M/6hfiD+kUlKvUUyTPJg4SmzjLF3sZbZ5dBhmK2y0wpczvUtB IoVVRiIL27eG5OFLkJ6JkASCoFvsKoEKQDcJ/08ur+F/37s8Ft+1wWKiIgmDRToMvwMI bk3g== X-Gm-Message-State: ALoCoQmaZQuIPxudgyl1XmV+DZsMkveWqokBKr5s/KhUKEJZDRpF8QRegcde8QKUHaGFWNHIfYW3 X-Received: by 10.202.83.142 with SMTP id h136mr11893283oib.123.1441160084888; Tue, 01 Sep 2015 19:14:44 -0700 (PDT) From: Bart Schaefer Message-Id: <150901191441.ZM15728@torch.brasslantern.com> Date: Tue, 1 Sep 2015 19:14:41 -0700 In-Reply-To: <20150902001322.GA17603@zira.vinc17.org> Comments: In reply to Vincent Lefevre "Re: zsh 5.1 freezes with zombie child" (Sep 2, 2:13am) References: <20150901230743.GA12128@zira.vinc17.org> <20150902001322.GA17603@zira.vinc17.org> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Vincent Lefevre , zsh-workers@zsh.org Subject: Re: zsh 5.1 freezes with zombie child MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 2, 2:13am, Vincent Lefevre wrote: } } zira% updprompt() { true && { : } } } zira% TRAPCHLD() { updprompt } } zira% sleep 2 & sleep 3 ; echo OK } [1] 20452 } [1] + done sleep 2 } } and zsh freezes here. The following fixes it, but makes me nervous. Is Mathias Fredriksson still listening? Try to reproduce that deadlock from the thread back at the beginning of August? (Was it really that recently? Gaah.) diff --git a/Src/signals.c b/Src/signals.c index f45c186..aa0b5aa 100644 --- a/Src/signals.c +++ b/Src/signals.c @@ -1348,6 +1348,7 @@ void dotrap(int sig) { void *funcprog; + int q = queue_signal_level(); if (sigtrapped[sig] & ZSIG_FUNC) { HashNode hn = gettrapnode(sig, 0); @@ -1370,5 +1371,9 @@ dotrap(int sig) if ((sigtrapped[sig] & ZSIG_IGNORED) || !funcprog || errflag) return; + dont_queue_signals(); + dotrapargs(sig, sigtrapped+sig, funcprog); + + restore_queue_signals(q); }