snapshot 20050114 race (on list)

Pierre A. Humblet pierre.humblet@ieee.org
Fri Jan 14 19:33:00 GMT 2005



Christopher Faylor wrote:

> >
> >I think there is no real need to distinguish between
> >PID_ZOMBIE and PID_EXITED.
> 
> Actually, there is.  I thought about this a lot.  I would like to get
> rid of both states but they are not identical.  The PID_ZOMBIE state
> is only valid for situations when the parent has not yet wait()ed for
> the child or for when the parent is ignoring SIGCHLD.  PID_EXIT just
> indicates that the child has exited and the parent, if one exists,
> hasn't gotten around to it yet.
> 
> While you could just set PID_ZOMBIE in every case, that would mean
> that ps would occasionally display a pid as a zombie that wasn't
> truly a zombie.  I couldn't convince myself that was a good thing.
> 
> I also don't see how there can be a race between setting PID_ZOMBIE and
> PID_EXITED.  PID_ZOMBIE is only set when a child has either already set
> PID_EXITED or the child has exited.

You are right, there is no race there. Sorry for the noise.
Most places in Cygwin (e.g. ps) don't seem distinguish between ZOMBIE and
EXITED, but fhandler_process does. Perhaps ps should too. 

Pierre



More information about the Cygwin-developers mailing list