unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se>
Subject: Re: Running two processes rapidly makes Emacs eat 100% CPU on w32
Date: Fri, 03 Nov 2006 22:11:02 +0100	[thread overview]
Message-ID: <20061103220220.C1BF.SLAWOMIR.NOWACZYK.847@student.lu.se> (raw)
In-Reply-To: <20061027001549.E487.SLAWOMIR.NOWACZYK.847@student.lu.se>

On Fri, 27 Oct 2006 23:36:22 +0200
Slawomir Nowaczyk <slawomir.nowaczyk.847@student.lu.se> wrote:

#> So, the following patch fixes the problem for me, but I have no way of
#> knowing if it really is a correct solution. I have been running with it
#> for a couple of days now and haven't notice anything wrong, though. I
#> have also verified that both processes are correctly reap_subprocess'ed
#> in the (progn (start-process "" nil "ls") (call-process "ls")) case.
#> 
#> **********************************************************************
#> 
#> --- m:/EmacsCVS/EmacsCVS/src/w32proc_orig.c     2006-09-26 20:28:27.518832000 +0200
#> +++ m:/EmacsCVS/EmacsCVS/src/w32proc.c  2006-10-27 00:12:26.527475200 +0200
#> @@ -486,7 +486,8 @@
#>      {
#>        for (cp = child_procs+(child_proc_count-1); cp >= child_procs; cp--)
#>         /* some child_procs might be sockets; ignore them */
#> -       if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess)
#> +       if (CHILD_ACTIVE (cp) && cp->procinfo.hProcess
#> +      && (cp->fd < 0 || (fd_info[cp->fd].flags & FILE_AT_EOF) != 0))
#>           {
#>             wait_hnd[nh] = cp->procinfo.hProcess;
#>             cps[nh] = cp;
#> 
#> **********************************************************************

I have now been running with this patch applied for over a week and
haven't seen a single instance of emacs eating 100% CPU... before, in my
setup, it was happening at least twice or three times per week.

I have not noticed any other problems, either.

Therefore, I suggest applying this patch.

**********************************************************************

Here is changelog entry:

2006-10-27  Slawomir Nowaczyk  <slawek@cs.lth.se>

	* w32proc.c: (sys_wait) Only wait for processes with fd<0.
	  Others should be handled by sys_select instead. Fixes problems
	  with (progn (start-process "" nil "ls") (call-process "ls"))

**********************************************************************

-- 
 Best wishes,
   Slawomir Nowaczyk
     ( slawomir.nowaczyk.847@student.lu.se )

Nostalgia isn't what it used to be.

  reply	other threads:[~2006-11-03 21:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12  8:44 Running two processes rapidly makes Emacs eat 100% CPU on w32 Slawomir Nowaczyk
2006-10-12 10:47 ` Eli Zaretskii
2006-10-12 13:52   ` Slawomir Nowaczyk
2006-10-13 15:50     ` Eli Zaretskii
2006-10-14  7:53       ` Slawomir Nowaczyk
2006-10-27 21:36       ` Slawomir Nowaczyk
2006-11-03 21:11         ` Slawomir Nowaczyk [this message]
2006-11-04  3:37           ` Chong Yidong

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=20061103220220.C1BF.SLAWOMIR.NOWACZYK.847@student.lu.se \
    --to=slawomir.nowaczyk.847@student.lu.se \
    /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).