emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running two processes rapidly makes Emacs eat 100% CPU on w32


From: Slawomir Nowaczyk
Subject: Re: Running two processes rapidly makes Emacs eat 100% CPU on w32
Date: Fri, 03 Nov 2006 22:11:02 +0100

On Fri, 27 Oct 2006 23:36:22 +0200
Slawomir Nowaczyk <address@hidden> 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  <address@hidden>

        * 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
     ( address@hidden )

Nostalgia isn't what it used to be.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]