GNU bug report logs -
#28544
[macOS] emacs will consume 100% cpu after gdb debugee exits
Previous Next
Reported by: Sung Ho Kim <sk6875 <at> gmail.com>
Date: Thu, 21 Sep 2017 18:18:02 UTC
Severity: normal
Tags: confirmed, moreinfo
Found in version 26.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #18 received at 28544 <at> debbugs.gnu.org (full text, mbox):
Sung Ho Kim <sk6875 <at> 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
This bug report was last modified 4 years and 179 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.