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: Fri, 17 Aug 2007 23:01:33 +0530

Hi,

On 8/17/07, Jason Rumney <address@hidden> wrote:
> dhruva wrote:
> > Hi,
> >  I have put it a fix that seems to solve this problem
> > !         if (WaitForSingleObject (cp->thrd, 1000) != WAIT_OBJECT_0)
> >
>
> Why would WaitSingleObject act differently depending on which compiler
> was use to compile Emacs? It is a system call. I think the problem lies
> elsewhere, and this is just a workaround (which could itself lead to
> indefinite hanging of Emacs).

I have not modified the the call to WaitForSingleObject in the latest
patch. I doubt the implementation of read which could be different for
different compilers (C-runtime library).
It is the call to read in _sys_read_ahead which continues to block
even after the sub process is killed. If we change that read to use
ReadFile using OVERLAPPED structure, we could handle canceling of IO
when we want to terminate the thread more elegantly. But, that would
be more changes as we need to use the HANDLE and not fd.

-dky

-- 
Dhruva Krishnamurthy
Contents reflect my personal views only!




reply via email to

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