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 18:40:44 +0200 Message-ID: <83h7nb7e9f.fsf@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> <5638F98B-832B-456A-89F6-559DFB43BBAD@gnu.org> <87czxzx68b.fsf@igel.home> <83k0s77hhu.fsf@gnu.org> <87sg6vvcbo.fsf@igel.home> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24762"; mail-complaints-to="usenet@ciao.gmane.io" Cc: phst@google.com, p.stephani2@gmail.com, emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 20 17:41:25 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 1l2GXs-0006Ld-2H for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jan 2021 17:41:24 +0100 Original-Received: from localhost ([::1]:44088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2GXr-0001S9-3i for ged-emacs-devel@m.gmane-mx.org; Wed, 20 Jan 2021 11:41:23 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37678) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l2GX7-0000v9-3s for emacs-devel@gnu.org; Wed, 20 Jan 2021 11:40:37 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53900) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l2GX5-0003OV-Uu; Wed, 20 Jan 2021 11:40:35 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2097 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l2GX5-0005SG-2Z; Wed, 20 Jan 2021 11:40:35 -0500 In-Reply-To: <87sg6vvcbo.fsf@igel.home> (message from Andreas Schwab on Wed, 20 Jan 2021 16:48:43 +0100) 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:263210 Archived-At: > From: Andreas Schwab > Cc: emacs-devel@gnu.org, phst@google.com, p.stephani2@gmail.com > Date: Wed, 20 Jan 2021 16:48:43 +0100 > > On Jan 20 2021, Eli Zaretskii wrote: > > > So maybe this is the problem we should solve: make the SIGCHLD handler > > reset the bit of the process's output from the fd_set passed to > > pselect. > > You cannot do that. That creates races all over the place. What kind of races, and where in our code? please elaborate.