From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: scratch/sigchld-fd 8f0ce42 1/2: Fix deadlock when receiving SIGCHLD during 'pselect'. Date: Wed, 20 Jan 2021 12:14:53 +0200 Message-ID: <5638F98B-832B-456A-89F6-559DFB43BBAD@gnu.org> References: <20210116184947.2105.45267@vcs0.savannah.gnu.org> <20210116184949.3C17C211A5@vcs0.savannah.gnu.org> <834kjd7yk5.fsf@gnu.org> <83turc7n93.fsf@gnu.org> <871regr6x5.fsf@igel.home> <83r1mg6zy2.fsf@gnu.org> <87pn20vwac.fsf@igel.home> <504E9D30-9AB0-4AF7-A128-66AB17983B67@gnu.org> <87lfcovuec.fsf@igel.home> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6683"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: K-9 Mail for Android Cc: phst@google.com, p.stephani2@gmail.com To: emacs-devel@gnu.org,Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 20 11:16:45 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l2AXc-0001EV-Uv for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jan 2021 11:16:44 +0100 Original-Received: from localhost ([::1]:58286 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2AXb-0006yw-V2 for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jan 2021 05:16:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33098) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2AVv-000633-47 for emacs-devel@gnu.org; Wed, 20 Jan 2021 05:14:59 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:47845) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2AVu-0004Wr-9e; Wed, 20 Jan 2021 05:14:58 -0500 Original-Received: from [2a02:14f:1:1c8c::1] (port=51590) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1l2AVt-0006wP-5F; Wed, 20 Jan 2021 05:14:58 -0500 In-Reply-To: <87lfcovuec.fsf@igel.home> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:263201 Archived-At: On January 20, 2021 11:18:19 AM GMT+02:00, Andreas Schwab wrote: > On Jan 20 2021, Eli Zaretskii wrote: >=20 > > Please tell more, especially what is meant by "checking for the > signal"=2E We have a handler installed, so who is or should be checking > for it? >=20 > The check that the signal occured and what to pass to pselect so it > doesn't block waiting for the condition that just occured=2E If/when the signal arrives, the handler removes the file descriptor of the= process from the set on which pselect will wait=2E Isn't that sufficient = to prevent us from waiting for a dead process? If not, why not?