ps questions

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Dec 18 17:33:00 GMT 2014


On Dec 18 10:26, Warren Young wrote:
> On Dec 18, 2014, at 10:11 AM, Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> 
> > The <defunct> information is fetched from the process itself.  This
> > requires a living, valid Cygwin process, so the info isn't available for
> > Windows processes.
> 
> On a Unix/Linux system, a process is marked <defunct> when the kernel
> knows it has died, but its parent hasn’t called wait(2) or similar
> yet, so the kernel keeps info about the process around with the
> expectation that this call will come later.
> 
> So, you’re saying that Cygwin doesn’t do something similar?

Similar, but not the same.  Cygwin isn't a kernel and the process
information is kept in shared memory regions held by the parent process
and the process itself.  This model has limitations you don't have on a
real kernel.

> If it did, it would be able to distinguish between dead Cygwin
> processes and dead native processes.  “I didn’t start that one, so I
> will mark it <dead> instead of <defunct>,” kind of thing.

The <defunct> in case of a Windows process means only that the calling
process was incapable of fetching this information.  It doesn't know
the state, because the target process didn't reply with the requested
information.  Actually, it didn't reply at all.  That's one of the
limitations of the model.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20141218/6abac2d9/attachment.sig>


More information about the Cygwin mailing list