unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sung Ho Kim <sk6875@gmail.com>
Cc: 28544@debbugs.gnu.org, "Charles A. Roelli" <charles@aurox.ch>
Subject: bug#28544: 26.0.50; emacs will consume 100% cpu after gdb debugee exits
Date: Sun, 16 Aug 2020 18:46:48 +0200	[thread overview]
Message-ID: <87364mv8qv.fsf@gnus.org> (raw)
In-Reply-To: <m27ewuqdfa.fsf@dana.local.i-did-not-set--mail-host-address--so-tickle-me> (Sung Ho Kim's message of "Wed, 20 Sep 2017 12:03:37 +0900")

Sung Ho Kim <sk6875@gmail.com> writes:

> after rebuilding with the aforementioned change, the 100% cpu usage
> disappears.  I have refrained from offering a patch because I am not
> fully knowledgeable with the code and its possible side effects.

Well, that's unfortunate, because without a patch it's difficult to
interpret just what it is you're proposing.

If I piece together the code correctly, you're saying the following
patch fixes the problem on Macos?

diff --git a/src/process.c b/src/process.c
index 15634e4a8b..740891983e 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5821,7 +5821,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 		 EIO, just continue, because the child process has
 		 exited and should clean itself up soon (e.g. when we
 		 get a SIGCHLD).  */
-	      else if (nread == -1 && errno == EIO)
+ 	      else if (nread == 0 && !NETCONN_P (proc) && !SERIALCONN_P (proc)
+ 		       && !PIPECONN_P (proc))
+#ifdef DARWIN_OS
 		{
 		  struct Lisp_Process *p = XPROCESS (proc);
 
@@ -5838,6 +5840,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
 		      pset_status (p, Qfailed);
 		    }
 		}
+#else
+	      ;
+#endif
 #endif /* HAVE_PTYS */
 	      /* If we can detect process termination, don't consider the
 		 process gone just because its pipe is closed.  */


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  parent reply	other threads:[~2020-08-16 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-20  3:03 bug#28544: 26.0.50; emacs will consume 100% cpu after gdb debugee exits Sung Ho Kim
2017-11-26 14:17 ` Charles A. Roelli
2020-08-16 16:46 ` Lars Ingebrigtsen [this message]
2020-11-24  8:43   ` bug#28544: [macOS] " Lars Ingebrigtsen
     [not found] <mailman.907.1506017889.14750.bug-gnu-emacs@gnu.org>
2017-10-28 14:10 ` bug#28544: 26.0.50; " sk6875
2017-10-28 17:02   ` Eli Zaretskii
     [not found]   ` <mailman.2406.1509210248.27995.bug-gnu-emacs@gnu.org>
2017-10-28 21:52     ` sk6875

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87364mv8qv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=28544@debbugs.gnu.org \
    --cc=charles@aurox.ch \
    --cc=sk6875@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).