all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* busyloop in sigchld_handler
@ 2007-03-11 18:33 Sam Steingold
  2007-03-11 19:39 ` Kim F. Storm
  2007-03-26  1:47 ` YAMAMOTO Mitsuharu
  0 siblings, 2 replies; 58+ messages in thread
From: Sam Steingold @ 2007-03-11 18:33 UTC (permalink / raw)
  To: emacs-devel

GNU Emacs 22.0.95.2 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2007-03-11 on loiso

I have been observing the following behavior:
emacs hangs in sigchld_handler waiting for the child process to
terminate:

      do
	{
	  errno = 0;
	  pid = wait3 (&w, WNOHANG | WUNTRACED, 0);
	}
      while (pid < 0 && errno == EINTR);

the system stops responding, loadavg goes to 5-8(!), CPU is 100% busy.
this lasts for ~10 seconds.
this happens on M-c compile and when I click on a URL (it is passed to
an existing Firefox).

I fixed the problem with the following patch:

Index: process.c
===================================================================
RCS file: /sources/emacs/emacs/src/process.c,v
retrieving revision 1.500
retrieving revision 1.501
diff -u -w -u -b -w -i -B -r1.500 -r1.501
--- process.c	1 Mar 2007 10:17:41 -0000	1.500
+++ process.c	11 Mar 2007 18:16:50 -0000	1.501
@@ -6497,6 +6497,7 @@
       /* Keep trying to get a status until we get a definitive result.  */
       do
 	{
+          sleep (1);
 	  errno = 0;
 	  pid = wait3 (&w, WNOHANG | WUNTRACED, 0);
 	}


Thanks.

-- 
Sam Steingold (http://sds.podval.org/) on Fedora Core release 6 (Zod)
http://ffii.org http://pmw.org.il http://palestinefacts.org
http://iris.org.il http://mideasttruth.com http://truepeace.org
Old Age Comes at a Bad Time.

^ permalink raw reply	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2007-03-29 17:59 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-11 18:33 busyloop in sigchld_handler Sam Steingold
2007-03-11 19:39 ` Kim F. Storm
2007-03-11 19:43   ` David Kastrup
2007-03-11 19:51     ` Sam Steingold
2007-03-11 20:42       ` Kim F. Storm
2007-03-11 21:06   ` Sam Steingold
2007-03-11 21:14     ` Eli Zaretskii
2007-03-11 21:17       ` Sam Steingold
2007-03-11 21:51         ` Eli Zaretskii
2007-03-11 22:21           ` Sam Steingold
2007-03-12  4:24             ` Richard Stallman
2007-03-12  7:00               ` David Kastrup
2007-03-13  2:43                 ` Richard Stallman
2007-03-11 22:27     ` Andreas Schwab
2007-03-11 22:30     ` Kim F. Storm
2007-03-12 17:37     ` Andreas Schwab
2007-03-12 17:53       ` Sam Steingold
2007-03-12 18:45         ` Andreas Schwab
2007-03-12 18:57           ` Sam Steingold
2007-03-12 19:28             ` Andreas Schwab
2007-03-12 19:34               ` David Kastrup
2007-03-12 21:36                 ` Andreas Schwab
2007-03-13  7:29                   ` David Kastrup
2007-03-13  9:29                     ` Andreas Schwab
2007-03-13 22:19                       ` David Kastrup
2007-03-13 22:28                         ` Andreas Schwab
2007-03-13 22:54                           ` David Kastrup
2007-03-13 23:17                             ` Andreas Schwab
2007-03-14  7:06                               ` David Kastrup
2007-03-14  9:24                                 ` Kim F. Storm
2007-03-14 10:00                                   ` David Kastrup
2007-03-14 10:22                                     ` Andreas Schwab
2007-03-14 10:52                                       ` David Kastrup
2007-03-14 11:01                                         ` Andreas Schwab
2007-03-14 11:12                                           ` David Kastrup
2007-03-14 12:29                                             ` Andreas Schwab
2007-03-14 10:01                                   ` Andreas Schwab
2007-03-14 13:15                                     ` Kim F. Storm
2007-03-14 13:41                                       ` Andreas Schwab
2007-03-14 14:10                                         ` Kim F. Storm
2007-03-14 14:12                                           ` Andreas Schwab
2007-03-14 15:02                                             ` Kim F. Storm
2007-03-14 16:34                                               ` Andreas Schwab
2007-03-16  9:34                                                 ` Kim F. Storm
2007-03-16  9:59                                                   ` Andreas Schwab
2007-03-14  3:24                     ` Richard Stallman
2007-03-14 17:34                       ` David Kastrup
2007-03-26  1:47 ` YAMAMOTO Mitsuharu
2007-03-26  2:02   ` Sam Steingold
2007-03-26  2:17     ` YAMAMOTO Mitsuharu
2007-03-28 10:02     ` Kim F. Storm
2007-03-28 15:19       ` Chong Yidong
2007-03-28 15:25         ` Andreas Schwab
2007-03-28 15:33           ` Kim F. Storm
2007-03-28 15:37             ` Andreas Schwab
2007-03-28 20:18               ` Kim F. Storm
2007-03-29 17:59                 ` Richard Stallman
2007-03-28 15:30         ` Alfred M. Szmidt

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.