This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ps questions


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

Attachment: pgpJZXwZFDa0I.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]