From: storm@cua.dk (Kim F. Storm)
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: Andreas Schwab <schwab@suse.de>,
Chong Yidong <cyd@stupidchicken.com>, Sam Steingold <sds@gnu.org>,
rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Change in process.c
Date: Wed, 28 Mar 2007 22:57:05 +0200 [thread overview]
Message-ID: <m3irclf5ni.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <460ABD1D.6080605@swipnet.se> ("Jan Djärv"'s message of "Wed\, 28 Mar 2007 21\:08\:13 +0200")
Jan Djärv <jan.h.d@swipnet.se> writes:
> I can see this too. But it is this code that gets executed over and
> over again (process.c, line 4810 or so):
Good catch!!
Does the following patch give good results?
*** process.c 28 Mar 2007 11:18:56 +0200 1.508
--- process.c 28 Mar 2007 22:55:11 +0200
***************
*** 4820,4826 ****
got lost. So raise the signl again just in case.
It can't hurt. */
else if (nread == -1 && errno == EIO)
! kill (getpid (), SIGCHLD);
#endif /* HAVE_PTYS */
/* If we can detect process termination, don't consider the process
gone just because its pipe is closed. */
--- 4820,4832 ----
got lost. So raise the signl again just in case.
It can't hurt. */
else if (nread == -1 && errno == EIO)
! {
! /* Clear the descriptor now, so we only raise the signal once. */
! FD_CLR (channel, &input_wait_mask);
! FD_CLR (channel, &non_keyboard_wait_mask);
!
! kill (getpid (), SIGCHLD);
! }
#endif /* HAVE_PTYS */
/* If we can detect process termination, don't consider the process
gone just because its pipe is closed. */
***************
*** 6502,6512 ****
/* Keep trying to get a status until we get a definitive result. */
do
{
- /* For some reason, this sleep() prevents Emacs from sending
- loadavg to 5-8(!) for ~10 seconds.
- See http://thread.gmane.org/gmane.emacs.devel/67722 or
- http://www.google.com/search?q=busyloop+in+sigchld_handler */
- usleep (1000);
errno = 0;
pid = wait3 (&w, WNOHANG | WUNTRACED, 0);
}
--- 6508,6513 ----
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2007-03-28 20:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-26 23:13 Change in process.c Richard Stallman
2007-03-27 3:06 ` Sam Steingold
2007-03-27 9:55 ` Andreas Schwab
2007-03-27 10:33 ` Nick Roberts
2007-03-27 16:43 ` Richard Stallman
2007-03-27 21:16 ` Chong Yidong
2007-03-27 22:11 ` Nick Roberts
2007-03-28 14:02 ` Sam Steingold
2007-03-28 21:09 ` Nick Roberts
2007-03-28 13:55 ` Sam Steingold
2007-03-28 14:13 ` Andreas Schwab
2007-03-28 15:25 ` Sam Steingold
2007-03-28 19:08 ` Jan Djärv
2007-03-28 20:57 ` Kim F. Storm [this message]
2007-03-29 6:12 ` Jan Djärv
2007-03-29 21:25 ` Kim F. Storm
2007-03-28 15:11 ` Chong Yidong
2007-03-28 16:09 ` Richard Stallman
2007-03-29 13:57 ` Randal L. Schwartz
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3irclf5ni.fsf@kfs-l.imdomain.dk \
--to=storm@cua.dk \
--cc=cyd@stupidchicken.com \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
--cc=rms@gnu.org \
--cc=schwab@suse.de \
--cc=sds@gnu.org \
/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 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.