From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: 24.0.50; accept-process-output on listening sockets not incorruptible Resent-From: Helmut Eller Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 May 2010 22:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6074 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6074@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.12727522257922 (code B ref -1); Sat, 01 May 2010 22:18:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 May 2010 22:17:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8Kzh-00023j-A4 for submit@debbugs.gnu.org; Sat, 01 May 2010 18:17:05 -0400 Received: from mail.gnu.org ([199.232.76.166] helo=mx10.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8Kzf-00023H-7Z for submit@debbugs.gnu.org; Sat, 01 May 2010 18:17:03 -0400 Received: from lists.gnu.org ([199.232.76.165]:39129) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1O8Kzb-0001XT-0Q for submit@debbugs.gnu.org; Sat, 01 May 2010 18:16:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O8Kza-0004oT-FV for bug-gnu-emacs@gnu.org; Sat, 01 May 2010 18:16:58 -0400 Received: from [140.186.70.92] (port=49954 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O8Kym-0004hY-Ti for bug-gnu-emacs@gnu.org; Sat, 01 May 2010 18:16:58 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FSL_HELO_NON_FQDN_1, HELO_NO_DOMAIN, RCVD_IN_BRBL_LASTEXT, RCVD_IN_RP_RNBL, T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.0 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O8KyY-0004pt-OG for bug-gnu-emacs@gnu.org; Sat, 01 May 2010 18:15:55 -0400 Received: from dial-178183.pool.broadband44.net ([212.46.178.183]:43354 helo=ix) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O8KyY-0004pd-HX for bug-gnu-emacs@gnu.org; Sat, 01 May 2010 18:15:54 -0400 Received: from helmut by ix with local (Exim 4.69) (envelope-from ) id 1O8KyX-0001SR-54 for bug-gnu-emacs@gnu.org; Sun, 02 May 2010 00:15:53 +0200 From: Helmut Eller Date: Sun, 02 May 2010 00:15:53 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -5.8 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) With this code Emacs seems to be stuck in an endless loop and is not incorruptible with C-g: (let ((proc (make-network-process :name "foo" :server t :noquery t :family 'local :service "/tmp/foo.socket"))) (accept-process-output proc)) From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 20 22:44:56 2017 Received: (at control) by debbugs.gnu.org; 21 Feb 2017 03:44:56 +0000 Received: from localhost ([127.0.0.1]:48053 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg1No-0007DM-27 for submit@debbugs.gnu.org; Mon, 20 Feb 2017 22:44:56 -0500 Received: from mail-it0-f52.google.com ([209.85.214.52]:38720) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cg1Nl-0007D9-VZ for control@debbugs.gnu.org; Mon, 20 Feb 2017 22:44:54 -0500 Received: by mail-it0-f52.google.com with SMTP id y135so37308512itc.1 for ; Mon, 20 Feb 2017 19:44:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:date:message-id:mime-version; bh=b5hFauUeMG0yWLA0q/9Jh4x6G5z/Xb4tKqZUiIsi/X8=; b=Q1F37Ba1Zgokagc9V3fsJVS3gdc+UurY1q0l8icNsoVlnSopq83ZKqnxzZEw0KikzC y25vaOwZhAbX+GZw/1fbHYz4E26oA6axen3nU2YXNpIowzMnlYGm/25MYET+J/0yq6nP SUSKNjbpRbg3Y5/zdbf3pThye5EslcBK0JWm0iMvDXEXsPqe8UyKm0ETpx42XvcBHyw1 hv5UJyPu/w4zoOgG1v26liGFCALOaL997jn5WoQHYlUdKIck5rXPMhTun/+dD1nhAKip 0fTTuCSuEgGGznOT1oHfw8wUO6n4IzB3wW2lsyk1k20G92D/dEBjMOXD80B7+6yns34c PJ4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:date:message-id :mime-version; bh=b5hFauUeMG0yWLA0q/9Jh4x6G5z/Xb4tKqZUiIsi/X8=; b=q8p/DoHP8MipEHEvsnSq+T8mzIO0WHam94VY+SnK841AK2dzDQCvNi468P7em2Trn4 vYTFvXdthkz9XkTFgHeCy8Z/DAfDOx+DRDja3ml8i3K0QEyJZ9xzvKqvyWsM1BtGZjNz RIztYVDXJHEHjj5nIFHo/ZSbtFrRStIzEpli8NXHE9LuQPyFuYFwsFBgakpP9w3sIW3Q AdM065+KsawvHhk2OLRSxFW+EMtRrr1uTvu5+AmhEbTfaM1cBHdch9ZXM5rSkY86tVqT 2lbOcqjlDziTgiJJnzqk1pvNGuJtZv3tJZj2CUTNyfLat2FM9i3KjzA61VpWEHbvHNKz iXxQ== X-Gm-Message-State: AMke39lVTxQxDTk6H7rSINsbbWmRHwO0S/ujq59oOLGyGCS8C069T5DNmP7fmdPuhKSt7g== X-Received: by 10.36.9.198 with SMTP id 189mr22303683itm.32.1487648688298; Mon, 20 Feb 2017 19:44:48 -0800 (PST) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id 198sm9830294ioz.59.2017.02.20.19.44.47 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Feb 2017 19:44:47 -0800 (PST) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: control message for bug #6074 Date: Mon, 20 Feb 2017 22:45:59 -0500 Message-ID: <87zihggqa0.fsf@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.6 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.6 (/) tags 6074 confirmed found 6074 25.2 retitle 6074 accept-process-output on listening sockets cause non-interruptible infloop quit From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop References: In-Reply-To: Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jul 2019 03:54: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 To: 6074@debbugs.gnu.org Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.15637675969949 (code B ref 6074); Mon, 22 Jul 2019 03:54:01 +0000 Received: (at 6074) by debbugs.gnu.org; 22 Jul 2019 03:53:16 +0000 Received: from localhost ([127.0.0.1]:59808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpPO0-0002aP-KU for submit@debbugs.gnu.org; Sun, 21 Jul 2019 23:53:16 -0400 Received: from mail-oi1-f179.google.com ([209.85.167.179]:37498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpPNy-0002aD-Uj for 6074@debbugs.gnu.org; Sun, 21 Jul 2019 23:53:15 -0400 Received: by mail-oi1-f179.google.com with SMTP id t76so28593365oih.4 for <6074@debbugs.gnu.org>; Sun, 21 Jul 2019 20:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=xr88X9Rc6Gda3qpRlo/gLTIfXmQoVfX/ILO6rnexQJk=; b=UEgM/kviq6SWYc4L/WoSjoK4xbppHseSZF27uN0gqmKxgoZ8iF0B5a9Oe1mqrxLbmW rDhrZbf8Vtv46zYQb0QBALLwFUcRyqU/a9vKCNff2Nd0cK5uuDkYcn0FXWA0cFobyPrl 37ZXbIGPfrDtc/L2ex1dNnYUry3GXYEw4sjIYj4R06/dguLcbhSPKrFxjdYbRudrGyh2 CqdLGMneCTjqdi4YRR0RIGTan3YUdrJxrK+xYieOEqkg17fOoe5gIlD+5Z0UpBQWXxu/ BH/kJd8pzuyecSyoPyB6vVHvJXQhl5luz9x0f2HCQXSatBGNaOTJk9sx2eOnjvlPZKYY 6BPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=xr88X9Rc6Gda3qpRlo/gLTIfXmQoVfX/ILO6rnexQJk=; b=GnKj+xCjHF7r65r4K2t8BenOXg5pFbFWT85aiOK++txM+j/gXmqcWoW/t67+ycH771 /sU4ZTkw7BuWUISvQVzhpwEAIKQtMLF30O1hWdDZHE+biHQj+I/zlRvlRX9KPXTL5UeB 3y0LAElofQ+Frd639ZXDsvoq/dolneZuQHgi2Miza6QMkEYedsMeBfFJpK+e7KLMujRq Pq1FcuS9GjsaUAMJMz+VxlwchJOCE0nzcg3KQfKxDvPO3hEe5SdhE/8MV6Vbo7mwZ6U+ OXwvKk3K5oY09MT3w2kjHmHa5a3Rr0Sxg333s0kbUrYWLgu+ks+TS8Wod3u71grtH4H5 EKLg== X-Gm-Message-State: APjAAAU5n0LzUmOaJepkdDRrs5AoWd586hY63U46R22vP4JDWfeHg+Kw 08B++mKmOJO+LsvlqFpXQkjXckyp1LqpZ835qm/kFaOp X-Google-Smtp-Source: APXvYqyGP14HNh90xtMfWFL3GZtPl7GC6wVz5HHrpQ32BrB54aNagwiXrDloqrxeNSh3Ru2QNkr2ldxiuBDF39PUaF0= X-Received: by 2002:aca:4790:: with SMTP id u138mr34384730oia.44.1563767589127; Sun, 21 Jul 2019 20:53:09 -0700 (PDT) MIME-Version: 1.0 From: Pip Cet Date: Mon, 22 Jul 2019 03:52:33 +0000 Message-ID: Content-Type: multipart/mixed; boundary="000000000000a96b4d058e3d0327" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000a96b4d058e3d0327 Content-Type: text/plain; charset="UTF-8" > With this code Emacs seems to be stuck in an endless loop and is not > incorruptible with C-g: > (let ((proc (make-network-process :name "foo" :server t :noquery t > :family 'local :service "/tmp/foo.socket"))) > (accept-process-output proc)) On Linux, the problem appears to be that we don't abort this infloop in process.c if a read () returns EINVAL: while (true) { int nread = read_process_output (proc, wait_proc->infd); if (nread < 0) { if (errno == EIO || would_block (errno)) break; } else { if (got_some_output < nread) got_some_output = nread; if (nread == 0) break; read_some_bytes = true; } } That seems problematic to me, since we might get non-EIO errors for other reasons. I'm attaching a patch that appears to fix the issue. --000000000000a96b4d058e3d0327 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Don-t-retry-reading-after-receiving-EINVAL-bug-6074.patch" Content-Disposition: attachment; filename="0001-Don-t-retry-reading-after-receiving-EINVAL-bug-6074.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jydutk5p0 RnJvbSBhZDI5NGJiMWU3ZmY3MDEyZGNhMzM0NWE4Y2EyMDQ2ZTBmOWRjOGZiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBNb24s IDIyIEp1bCAyMDE5IDAzOjQ5OjU0ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gRG9uJ3QgcmV0cnkg cmVhZGluZyBhZnRlciByZWNlaXZpbmcgRUlOVkFMIChidWcjNjA3NCkKCiogc3JjL3Byb2Nlc3Mu YyAod2FpdF9yZWFkaW5nX3Byb2Nlc3Nfb3V0cHV0KTogRG9uJ3QgcmV0cnkgcmVhZGluZwpmcm9t IGFuIGZkIGFmdGVyIGFuIHVua25vd24gZXJyb3IuCi0tLQogc3JjL3Byb2Nlc3MuYyB8IDQgKysr LQogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAt LWdpdCBhL3NyYy9wcm9jZXNzLmMgYi9zcmMvcHJvY2Vzcy5jCmluZGV4IGFiYWRhYmU3N2UuLjEz MTE0MDkyNzQgMTAwNjQ0Ci0tLSBhL3NyYy9wcm9jZXNzLmMKKysrIGIvc3JjL3Byb2Nlc3MuYwpA QCAtNTI3Nyw3ICs1Mjc3LDkgQEAgd2FpdF9yZWFkaW5nX3Byb2Nlc3Nfb3V0cHV0IChpbnRtYXhf dCB0aW1lX2xpbWl0LCBpbnQgbnNlY3MsIGludCByZWFkX2tiZCwKIAkJICBpbnQgbnJlYWQgPSBy ZWFkX3Byb2Nlc3Nfb3V0cHV0IChwcm9jLCB3YWl0X3Byb2MtPmluZmQpOwogCQkgIGlmIChucmVh ZCA8IDApCiAJCSAgICB7Ci0JCSAgICAgIGlmIChlcnJubyA9PSBFSU8gfHwgd291bGRfYmxvY2sg KGVycm5vKSkKKwkJICAgICAgaWYgKGVycm5vID09IEVJTlRSKQorCQkJY29udGludWU7CisJCSAg ICAgIGVsc2UKIAkJCWJyZWFrOwogCQkgICAgfQogCQkgIGVsc2UKLS0gCjIuMjIuMAoK --000000000000a96b4d058e3d0327-- From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop 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 To: Pip Cet Cc: 6074@debbugs.gnu.org Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.156380561124045 (code B ref 6074); Mon, 22 Jul 2019 14:27:01 +0000 Received: (at 6074) by debbugs.gnu.org; 22 Jul 2019 14:26:51 +0000 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 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 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 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 Date: Mon, 22 Jul 2019 17:26:29 +0300 Message-Id: <83imruqh62.fsf@gnu.org> From: Eli Zaretskii In-reply-to: (message from Pip Cet on Mon, 22 Jul 2019 03:52:33 +0000) References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 22 Jul 2019 17:47:02 +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 To: Eli Zaretskii Cc: 6074@debbugs.gnu.org Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.156381756219942 (code B ref 6074); Mon, 22 Jul 2019 17:47:02 +0000 Received: (at 6074) by debbugs.gnu.org; 22 Jul 2019 17:46:02 +0000 Received: from localhost ([127.0.0.1]:33594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpcNu-0005BT-0k for submit@debbugs.gnu.org; Mon, 22 Jul 2019 13:46:02 -0400 Received: from mail-ot1-f41.google.com ([209.85.210.41]:33727) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpcNs-0005B6-BQ for 6074@debbugs.gnu.org; Mon, 22 Jul 2019 13:46:00 -0400 Received: by mail-ot1-f41.google.com with SMTP id q20so41078049otl.0 for <6074@debbugs.gnu.org>; Mon, 22 Jul 2019 10:46:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/HoWjLKHNi1MlRG9o0icAu8bAkMfNL6W1vc0FcCPQy0=; b=GnoRM7U3DCiD5qJ+tFBgTovAfdi8JGERBMpokP19g6qjfnRO5G2I5UqK/2L9egIJr0 tnCTiUv8UgARZmXzQpuW7YaL7WUazxQrFA05lKcWipZouKR6ymmeeZOUNomxGkG/hefF 4oprQcZ6hHXN4xrAIwnLAX8MhZwtwKYE+z2O1wJirvsv/IX68gQjF9S0cy1sUwiBG/iD vI30Y93qnJX4XmCcMCrEsVcEqV3g38Xl1GFbJ4TaZUiXJqdL1WSAmHZ7mIUAuGW+j9kP fxlUJb2Cg9q6ip5SBS60ivychg1adRs+q7NNoi7LU27yTeGji6KJ0nfVi9o3cDl8BYxS LEDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/HoWjLKHNi1MlRG9o0icAu8bAkMfNL6W1vc0FcCPQy0=; b=aLHdllaWWzL2bY6a1qVhQEiR9STPRDInxp6RwQzqR6LXZ/HxOjmCTh2OOwBOHIUke0 R4Goewp9DCVJXsruA9XEORUuAc0nZwTWpC6l+yPx0OSYPOZGQ4oruIZNYWJvAkLwrBRO k9CFLAVbpBsgJ9UgQfSVaWgBjRmL/3fzm9ullHsMU3gxzuMnWWBq5vAZKHatra725HFr 449GpbKiF8qxCsdQFl7yLfsMxi/W1JpnR2YiirOaZ77uLEYrIeCKvUQR1PIY39re46DM qfYkUJZWxo9cMbjoaTdzZCMZxak2aRFNfmw3W9TDvsv59g2p6X+lLVvQn9TjIt4TWxE2 LNZA== X-Gm-Message-State: APjAAAUe6mVxmV1x2dCrYLwsTIoh5XydWnbfpxmwC6FqAzGN6dvbIivC IUTJxuUKQ/HIXa7RDcVU9VjBdLFhWQNlkHjK+I0oNQ== X-Google-Smtp-Source: APXvYqy4ulGeOyYjNAhViM7SNQ4ArzNqw3F0t9U1eBhQVbcLW0rr4KsIRlX2g7TMMp9R10Az9RQVqDKUuXtbnbcHdF0= X-Received: by 2002:a9d:6014:: with SMTP id h20mr19207244otj.210.1563817554564; Mon, 22 Jul 2019 10:45:54 -0700 (PDT) MIME-Version: 1.0 References: <83imruqh62.fsf@gnu.org> In-Reply-To: <83imruqh62.fsf@gnu.org> From: Pip Cet Date: Mon, 22 Jul 2019 17:45:18 +0000 Message-ID: Content-Type: multipart/mixed; boundary="000000000000d5745a058e48a5ef" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --000000000000d5745a058e48a5ef Content-Type: text/plain; charset="UTF-8" On Mon, Jul 22, 2019 at 2:26 PM Eli Zaretskii wrote: > > > 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? Why would we try again after receiving EINVAL? I believe the right behavior is to return immediately in this case, just as we do for EIO. However, we should probably call rarely_quit inside the loop, anyway, to catch the case of a kernel bug keeping us busy with EINTRs. How's this? --000000000000d5745a058e48a5ef Content-Type: text/x-patch; charset="US-ASCII"; name="0001-Don-t-retry-reading-after-receiving-EINVAL-bug-6074.patch" Content-Disposition: attachment; filename="0001-Don-t-retry-reading-after-receiving-EINVAL-bug-6074.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_jyeojwiy0 RnJvbSBhODk5MWNjYzFlODQ2YWVkOWE4ZjFiYTBlYmNkMjc3MWI2MjNmMjQxIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBQaXAgQ2V0IDxwaXBjZXRAZ21haWwuY29tPgpEYXRlOiBNb24s IDIyIEp1bCAyMDE5IDAzOjQ5OjU0ICswMDAwClN1YmplY3Q6IFtQQVRDSF0gRG9uJ3QgcmV0cnkg cmVhZGluZyBhZnRlciByZWNlaXZpbmcgRUlOVkFMIChidWcjNjA3NCkKCiogc3JjL3Byb2Nlc3Mu YyAod2FpdF9yZWFkaW5nX3Byb2Nlc3Nfb3V0cHV0KTogRG9uJ3QgcmV0cnkgcmVhZGluZwpmcm9t IGFuIGZkIGFmdGVyIGFuIHVua25vd24gZXJyb3IuCi0tLQogc3JjL3Byb2Nlc3MuYyB8IDQgKysr LQogMSBmaWxlIGNoYW5nZWQsIDMgaW5zZXJ0aW9ucygrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAt LWdpdCBhL3NyYy9wcm9jZXNzLmMgYi9zcmMvcHJvY2Vzcy5jCmluZGV4IGFiYWRhYmU3N2UuLjkx MDRhMzkyYzggMTAwNjQ0Ci0tLSBhL3NyYy9wcm9jZXNzLmMKKysrIGIvc3JjL3Byb2Nlc3MuYwpA QCAtNTI3MCwxNCArNTI3MCwxNiBAQCB3YWl0X3JlYWRpbmdfcHJvY2Vzc19vdXRwdXQgKGludG1h eF90IHRpbWVfbGltaXQsIGludCBuc2VjcywgaW50IHJlYWRfa2JkLAogCSAgLyogSWYgZGF0YSBj YW4gYmUgcmVhZCBmcm9tIHRoZSBwcm9jZXNzLCBkbyBzbyB1bnRpbCBleGhhdXN0ZWQuICAqLwog CSAgaWYgKHdhaXRfcHJvYy0+aW5mZCA+PSAwKQogCSAgICB7CisJICAgICAgdW5zaWduZWQgaW50 IGNvdW50ID0gMDsKIAkgICAgICBYU0VUUFJPQ0VTUyAocHJvYywgd2FpdF9wcm9jKTsKIAogCSAg ICAgIHdoaWxlICh0cnVlKQogCQl7CiAJCSAgaW50IG5yZWFkID0gcmVhZF9wcm9jZXNzX291dHB1 dCAocHJvYywgd2FpdF9wcm9jLT5pbmZkKTsKKwkJICByYXJlbHlfcXVpdCAoKytjb3VudCk7CiAJ CSAgaWYgKG5yZWFkIDwgMCkKIAkJICAgIHsKLQkJICAgICAgaWYgKGVycm5vID09IEVJTyB8fCB3 b3VsZF9ibG9jayAoZXJybm8pKQorCQkgICAgICBpZiAoZXJybm8gIT0gRUlOVFIpCiAJCQlicmVh azsKIAkJICAgIH0KIAkJICBlbHNlCi0tIAoyLjIyLjAKCg== --000000000000d5745a058e48a5ef-- From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2019 02:47:02 +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 To: Pip Cet Cc: 6074@debbugs.gnu.org Reply-To: rms@gnu.org Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.156384997611265 (code B ref 6074); Tue, 23 Jul 2019 02:47:02 +0000 Received: (at 6074) by debbugs.gnu.org; 23 Jul 2019 02:46:16 +0000 Received: from localhost ([127.0.0.1]:33825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpkoh-0002vd-QS for submit@debbugs.gnu.org; Mon, 22 Jul 2019 22:46:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43083) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpkof-0002vP-1B for 6074@debbugs.gnu.org; Mon, 22 Jul 2019 22:46:14 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45271) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hpkoZ-0005Nj-RI; Mon, 22 Jul 2019 22:46:07 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1hpkoY-0006sw-DA; Mon, 22 Jul 2019 22:46:06 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman In-Reply-To: (message from Pip Cet on Mon, 22 Jul 2019 03:52:33 +0000) References: Message-Id: Date: Mon, 22 Jul 2019 22:46:06 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > On Linux, the problem appears to be that Those words lead me to think that you're running GNU Emacs as part of the GNU operating system -- a version with Linx as the kernel. One of the obstacles that we GNU developers have to face is that people that use GNU don't know it is GNU. They think the system is "Linux". Thanks for reporting a bug in one part of the GNU system. While you're at it, could you please call the system "GNU/Linux", so as to help correct the misinformation of what it is, where it comes from, and why we developed it? See https://gnu.org/gnu/linux-and-gnu.html and https://gnu.org/gnu/gnu-linux-faq.html, plus the history in https://gnu.org/gnu/the-gnu-project.html. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 23 Jul 2019 14:32:02 +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 To: rms@gnu.org Cc: 6074@debbugs.gnu.org Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.1563892320749 (code B ref 6074); Tue, 23 Jul 2019 14:32:02 +0000 Received: (at 6074) by debbugs.gnu.org; 23 Jul 2019 14:32:00 +0000 Received: from localhost ([127.0.0.1]:35483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpvpf-0000C1-US for submit@debbugs.gnu.org; Tue, 23 Jul 2019 10:32:00 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:35422) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hpvpd-0000Bj-TX for 6074@debbugs.gnu.org; Tue, 23 Jul 2019 10:31:58 -0400 Received: by mail-ot1-f65.google.com with SMTP id j19so5780106otq.2 for <6074@debbugs.gnu.org>; Tue, 23 Jul 2019 07:31:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ubG8XdTneMYJnF5Sc9HcGkey7G3zvd71bcHFs7ilPNw=; b=kO8lpMfRKIIJKzoAkr2gnpCDZDVpR53xUF+05z2H7UanGYV6NhbKa6H7Om91qXJBRy 94pC7WLx/+pd0gh0rxBpc7clXMh11FwBTRlZ25/DqCuXC/vj/QFH0X3RVjhR6G20HM/e zARkjvSny18paR3eimHqRp8U5vmz+qztLw9gErEvrbv3KLAeeflj5+Nlq7mwnE75+hGk nJ1eZT0UDSELi/HmDUWCR1xR0fiil+0BeczmcvGESGVfhbWEyc+EfKZeWO+AIdDW/EdM dSq3f2G3VA7+VVn1HWstTyqTtWFRA/hqlLxBuYMW6+CG+dnSMP/QZSL03Ux+mvhAk3HD mNZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ubG8XdTneMYJnF5Sc9HcGkey7G3zvd71bcHFs7ilPNw=; b=Tggb8CmAYsJgu/oUrscTwxOTE3y8ul+rwCrjPKgVcSkYMHlUuCXypjVjgDrgzKf7Jt xCO8kW5ksa1xd7qa+AeZhqwus2y6CemH/4fWHr+ofqw0jFzTG7vyvzzCtWGnvU/H5Oz1 fp+EXwodOd8Q4HtQphoiqTYZSRVz11y1RQCheYEaMMS4O+wxNsv6x6MRinG7z3ew2CD7 mxXhgrAa1/s8Pbx4HaWCc3hBDE6/IK3+QQWRimUxSjmynhAqemGmCCDg5G3MgHmxeiAO ayQkYilG8i2sZY2QrDomBMNUGdLmrWHcr+t/hWGxrfmWDH8vdir/dkBkGOi3G8W+Fbka 8ozA== X-Gm-Message-State: APjAAAWJkCvKvEzlFswa+AUZNWKmnVg3KIIzah0lQwcz3yJgRhLrJtg4 FCZ1zSrhplWJNUPIJ1Pxbib/poE6S4ysrDh0JHU= X-Google-Smtp-Source: APXvYqyJfu4UzGzWP84xc/bhm0aaAeZNb+wJwudy4UZng0kJzLpAL9DMe9BGnu1BuBWHq/NZzMuL3dhZqJQfSLJHGrw= X-Received: by 2002:a9d:2901:: with SMTP id d1mr35324524otb.154.1563892312307; Tue, 23 Jul 2019 07:31:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Pip Cet Date: Tue, 23 Jul 2019 14:31:16 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On Tue, Jul 23, 2019 at 2:46 AM Richard Stallman wrote: > > On Linux, the problem appears to be that > > Those words lead me to think that you're running GNU Emacs as > part of the GNU operating system -- a version with Linx as the kernel. I am, indeed, but in this particular case, it is the Linux kernel doing something problematic: returning -EINVAL, which glibc merely stores in errno. But I agree it would have been more accurate to say something like "On this GNU/Linux system, the problem appears to be that the Linux kernel..." > Thanks for reporting a bug in one part of the GNU system. While (I didn't report it, I merely reproduced a very old bug report and suggested a fix.) > you're at it, could you please call the system "GNU/Linux", so as to > help correct the misinformation of what it is, where it comes from, > and why we developed it? Thanks for taking the time to remind me of that. From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Jul 2019 03:10: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 To: Pip Cet Cc: 6074@debbugs.gnu.org Reply-To: rms@gnu.org Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.15640241446655 (code B ref 6074); Thu, 25 Jul 2019 03:10:01 +0000 Received: (at 6074) by debbugs.gnu.org; 25 Jul 2019 03:09:04 +0000 Received: from localhost ([127.0.0.1]:38233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqU7s-0001jG-7B for submit@debbugs.gnu.org; Wed, 24 Jul 2019 23:09:04 -0400 Received: from eggs.gnu.org ([209.51.188.92]:53380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hqU7p-0001im-ML for 6074@debbugs.gnu.org; Wed, 24 Jul 2019 23:09:02 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hqU7k-0001dn-Jx; Wed, 24 Jul 2019 23:08:56 -0400 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1hqU7i-0005KF-VO; Wed, 24 Jul 2019 23:08:55 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman In-Reply-To: (message from Pip Cet on Tue, 23 Jul 2019 14:31:16 +0000) References: Message-Id: Date: Wed, 24 Jul 2019 23:08:54 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] Happy hacking! -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Sat Aug 16 21:15:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6074: accept-process-output on listening sockets cause non-interruptible infloop Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Sep 2020 13:22:02 +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 To: Pip Cet Cc: 6074@debbugs.gnu.org, Eli Zaretskii Received: via spool by 6074-submit@debbugs.gnu.org id=B6074.160008969119407 (code B ref 6074); Mon, 14 Sep 2020 13:22:02 +0000 Received: (at 6074) by debbugs.gnu.org; 14 Sep 2020 13:21:31 +0000 Received: from localhost ([127.0.0.1]:53109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHoQF-00052w-2V for submit@debbugs.gnu.org; Mon, 14 Sep 2020 09:21:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHoQC-00052h-U5 for 6074@debbugs.gnu.org; Mon, 14 Sep 2020 09:21:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+zeRUD+InaACtj0Kt5AOItkuDUZYXsneLFMiSUkzjB8=; b=t4OEQkWvpqSH5xoGRLs3uUKL6l M4HSAofMCl7SwtvqQ/jLqzRjKJuOyPIP1BhbSJEyAqETnthm3dvf2qYqpv1sXBYBfgvpULZw4VVog V9z2FdXZThK3BqMhaK//TiVsz+/sgkHTOGl/PmAnqMf8IMkP+43S4HadunMQhs7BtVVk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHoPx-0001ug-4b; Mon, 14 Sep 2020 15:21:22 +0200 From: Lars Ingebrigtsen References: <83imruqh62.fsf@gnu.org> X-Now-Playing: Xiu Xiu's _Girl with Basket of Fruit_: "The Wrong Thing" Date: Mon, 14 Sep 2020 15:21:11 +0200 In-Reply-To: (Pip Cet's message of "Mon, 22 Jul 2019 17:45:18 +0000") Message-ID: <87o8m8a3zs.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Pip Cet writes: > Why would we try again after receiving EINVAL? I believe the right > behavior is to return immediately in this case, just as we do for EIO. > > However, we should probably call rarely_quit inside th [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Pip Cet writes: > Why would we try again after receiving EINVAL? I believe the right > behavior is to return immediately in this case, just as we do for EIO. > > However, we should probably call rarely_quit inside the loop, anyway, > to catch the case of a kernel bug keeping us busy with EINTRs. How's > this? [...] > { > + unsigned int count = 0; > XSETPROCESS (proc, wait_proc); > > while (true) > { > int nread = read_process_output (proc, wait_proc->infd); > + rarely_quit (++count); > if (nread < 0) > { > - if (errno == EIO || would_block (errno)) > + if (errno != EINTR) > break; > } > else There was no followup on this patch at the time (except Richard chiding you for using forbidden terminology), but I tried the patch now, and it seems to fix the issue, so I've applied it to the trunk now. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 09:21:37 2020 Received: (at control) by debbugs.gnu.org; 14 Sep 2020 13:21:37 +0000 Received: from localhost ([127.0.0.1]:53112 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHoQL-00053F-CE for submit@debbugs.gnu.org; Mon, 14 Sep 2020 09:21:37 -0400 Received: from quimby.gnus.org ([95.216.78.240]:58744) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHoQJ-00052v-TF for control@debbugs.gnu.org; Mon, 14 Sep 2020 09:21:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ga5oojbW7YGPb7mfUnbesHoAZMike/KjFvQ3WRbW+yM=; b=e931qW5BaS/h+CiPqMyESMSotj utAH1H1cQcjzm9knoIsbMSjWsKhcZCI3I8jguFO+dtZ5W6g/8xaV0cjm6Hf36kHcIQrSezDQ0JtwM Qp6BN/+AGoAGy8WvlYmHwcBp/sYW1WrlK1PpxlPoy3LAP1y29QDAGNycih9bM/finwfA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHoQC-0001ur-6K for control@debbugs.gnu.org; Mon, 14 Sep 2020 15:21:30 +0200 Date: Mon, 14 Sep 2020 15:21:27 +0200 Message-Id: <87mu1sa3zc.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6074 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 6074 fixed close 6074 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 6074 fixed close 6074 28.1 quit