From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Date: Mon, 22 Jul 2019 17:26:29 +0300 Message-ID: <83imruqh62.fsf@gnu.org> References: Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="235699"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 6074@debbugs.gnu.org To: Pip Cet Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 22 16:27:06 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hpZHO-000zCU-HQ for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jul 2019 16:27:06 +0200 Original-Received: from localhost ([::1]:34110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpZHN-0002jf-GM for geb-bug-gnu-emacs@m.gmane.org; Mon, 22 Jul 2019 10:27:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36558) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hpZHK-0002jL-Vj for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 10:27:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hpZHK-0000e3-0q for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 10:27:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52880) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hpZHJ-0000du-T1 for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 10:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hpZHJ-0006GA-NQ for bug-gnu-emacs@gnu.org; Mon, 22 Jul 2019 10:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jul 2019 14:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 6074 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.156380561124045 (code B ref 6074); Mon, 22 Jul 2019 14:27:01 +0000 Original-Received: (at 6074) by debbugs.gnu.org; 22 Jul 2019 14:26:51 +0000 Original-Received: from localhost ([127.0.0.1]:33468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpZH8-0006Fl-Mf for submit@debbugs.gnu.org; Mon, 22 Jul 2019 10:26:50 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:52400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpZH7-0006FX-Np for 6074@debbugs.gnu.org; Mon, 22 Jul 2019 10:26:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hpZH2-0000Ce-JJ; Mon, 22 Jul 2019 10:26:44 -0400 Original-Received: from [176.228.60.248] (port=1278 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hpZH1-0004cU-RX; Mon, 22 Jul 2019 10:26:44 -0400 In-reply-to: (message from Pip Cet on Mon, 22 Jul 2019 03:52:33 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163594 Archived-At: > From: Pip Cet > Date: Mon, 22 Jul 2019 03:52:33 +0000 > > diff --git a/src/process.c b/src/process.c > index abadabe77e..1311409274 100644 > --- a/src/process.c > +++ b/src/process.c > @@ -5277,7 +5277,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, > int nread = read_process_output (proc, wait_proc->infd); > if (nread < 0) > { > - if (errno == EIO || would_block (errno)) > + if (errno == EINTR) > + continue; > + else > break; > } > else Isn't it better to simply call rarely_quit inside the loop?