>>>> "Mike" == Mike Alexander
<mta(a)arbortext.com> writes:
Mike> --On Sunday, July 29, 2001 4:02 AM -0400 Mike Alexander
Mike> <mta(a)arbortext.com> wrote:
> This crash is, in my opinion, going to be hard to fix. It is a
race
> condition if a subprocess goes away at about the same time
> mswindows_need_event is called. The handle for the subprocess may be in
> the vector of things it waits on even though the subprocess is gone. The
> only real way to fix this is to treat mswindows_need_event and the code
> that manipulates mswindows_waitable_handles as a critical section using a
> semaphore to control access to mswindows_waitable_handles.
Mike> After thinking about this some more, I don't think we can
Mike> fix it even by making a critical section of
Mike> mswindows_need_event and the code that manipulates
Mike> mswindows_waitable_handles. Even if we know the list of
Mike> handles is valid immediately before the call to
Mike> MsgWaitForMultipleObjects, it might contain an stale handle
Mike> by the time the operating system gets around to looking at
Mike> it. That's probably why there is a specific return code for
Mike> this case since it's hard to avoid passing a stale handle in
Mike> all cases.
Thanks for looking at this problem, Mike!
Mike> Mike Alexander <mailto:mtaï¼ arbortext.com>
Mike> Arbortext, Inc. +1-734-997-0200
--
Adrian Aichner
mailto:adrianï¼ xemacs.org
http://www.xemacs.org/