emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-process bug


From: Michaël Cadilhac
Subject: Re: delete-process bug
Date: Mon, 29 May 2006 23:42:39 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> If there's a message or two (as opposed to the whole thread) which I
> could read to figure out what are you asking about, please tell what
> that message is, and I will try to answer your questions.

I will summarize the whole thing:

1) A race condition was found:

delete_process is called  for a process A, a  synchronous process B is
then launched. sigchld_handler is now called for A, but A is not found
in process_alist, so it is considered to be synchronous, and B will be
said to be dead.

2) The chosen solution is the following:

We should remember the list of deleted processes. It's done thanks to
a static variable `deleted_process_list' in process.c.

When the sighandler is called, it will check if the process that
signaled Emacs is in `deleted_process_list'.

3) Now, we want to avoid leaks with this list: we want to know when
   both delete_process and sigchld_handler are called.

AFAICT, both functions are just in a #ifdef subprocesses. But, maybe,
in some systems, sigchld_handler is not used albeit compiled.

The question I asked is : do we have to disable the
`deleted_process_alist' mechanism in some configuration to avoid that
it will be filled but never cleaned ?

-- 
 |      Michaël `Micha' Cadilhac   |  Pour les 35-40 ans, l'humour          |
 |         Epita/LRDE Promo 2007   |       c'est une plus-value.            |
 | http://www.lrde.org/~cadilh_m   |          -- Guillaume L.               |
 `--  -   JID: address@hidden --'                                   -  --'

Attachment: pgpV4UjKRfSGd.pgp
Description: PGP signature


reply via email to

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