emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-process bug


From: David Kastrup
Subject: Re: delete-process bug
Date: Thu, 25 May 2006 17:26:09 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (Michaël Cadilhac) writes:

> Stefan Monnier <address@hidden> writes:
>
>>> This is  not really  due to my  patch. However,  it shows a  real race
>>> condition in process management of Emacs:
>> [...]
>>> After an hour of debugging, I can propose a small change that fixes
>>> this bug and lets no room for any other race condition of that kind,
>>> AFAICT.
>> [...]
>>> +   * process.c (Fdelete_process): Wait for process termination to
>>> +   avoid `sigchld_handler' to consider the process to be synchronous.
>>
>> I don't think it's a good idea.  The process might not die in response to
>> delete-process, so we would end up waiting "indefinitely".
>
> Well, I copied the behavior of call_process, and tried to minimize
> the patch.  However, I'm interested in knowing when a process
> doesn't answer a SIGKILL? I thought it was a non-ignorable signal.

That merely means that the process will never run again.  It puts it
into "zombie" state.  It will not get removed until the scheduler gets
around to start the cleanup, and then the cleanup still has to finish
(all files and sockets have to be closed).  When devices are stuck,
this can take arbitrarily long.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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