emacs-devel
[Top][All Lists]
Advanced

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

Re: address@hidden: Emacs 22.1 hung after delete-process]


From: dhruva
Subject: Re: address@hidden: Emacs 22.1 hung after delete-process]
Date: Thu, 16 Aug 2007 19:39:11 +0530

Hi,
 I have put it a fix that seems to solve this problem (observed on my
box). I find the issue in using SetEvent() and not waiting long enough
before calling TerminateThread(). Either we could remove the call the
TerminateThread() or increase the delay (that I have done) or ideally
use a critical section (add it in the child_process structure).

-dky


E:\cache\build\emacs\src
[dky]hg cdiff w32proc.c
*** emacs.58583440b48b\src\w32proc.c    2007-08-16 19:11:29.218750000 +0530
--- E:\cache\build\emacs\src\w32proc.c  2007-08-16 19:02:44.828125000 +0530
*************** delete_child (child_process *cp)
*** 216,222 ****
          /* let the thread exit cleanly if possible */
          cp->status = STATUS_READ_ERROR;
          SetEvent (cp->char_consumed);
!         if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
            {
              DebPrint (("delete_child.WaitForSingleObject (thread) failed "
                         "with %lu for fd %ld\n", GetLastError (), cp->fd));
--- 216,222 ----
          /* let the thread exit cleanly if possible */
          cp->status = STATUS_READ_ERROR;
          SetEvent (cp->char_consumed);
!         if (WaitForSingleObject (cp->thrd, INFINITE) != WAIT_OBJECT_0)
            {
              DebPrint (("delete_child.WaitForSingleObject (thread) failed "
                         "with %lu for fd %ld\n", GetLastError (), cp->fd));


-- 
Dhruva Krishnamurthy
Contents reflect my personal views only!




reply via email to

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