PPID in ps -efW not accurate

Corinna Vinschen corinna-cygwin@cygwin.com
Wed Jun 7 18:58:00 GMT 2017


On Jun  7 13:47, Erik Soderquist wrote:
> On Wed, Jun 7, 2017 at 1:31 PM, Corinna Vinschen  wrote:
> > Worse, given the fact that Windows reuses PIDs quickly after a process
> > died, this information can be totally wrong.
> 
> I was not aware Windows would reuse a PID when children of the
> previous process still existed...

Cygwin was bitten by this problem way back when.  We workaround this by
making sure to keep an open handle to the parent, even if the process
exited.  Other Windows processes don't, so you're bound to run into
problems when relying on that info.


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: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170607/32fae59c/attachment.sig>


More information about the Cygwin mailing list