cygwin 1.5.0-1 forked off child processes have open handles to non-existant processes

Ronald Landheer-Cieslak ronald@landheer.com
Thu Jul 10 15:41:00 GMT 2003


I was just walking my process tree with the process explorer when I saw 
the cron process had an open handle to a non-existant process (presumably 
its parent).

I tried the following code snippet to test that hypothesis:
-- BEGIN --
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>

int main( void )
{
   pid_t child;
   int stat;

   if ( ( child = fork(  ) ) == 0 ) // in child
   {
      setsid(  );
      while ( 1 )
         sleep( 1 );
   }

   return ( 0 );
}
--- END ---

and saw the same thing: an open handle for a non-existant process with 
access permissions 0x001F0FFF (though I have no idea what that stands 
for).

My currently running vim has the same type of open handle, as does bash - 
which has six of them and rxvt (which has two of them). The process IDs 
are different each time, but the access permissions are the same.

It looks like every single Cygwin process has at least one of these 
dangling handles..

I don't know what the consequences of such handles could be - they are 
presumably never used for anything, but I think it's a bug anyway..

Cygcheck output is available here:
a12f0c562a53d13de238def6bae050c1 *cygcheck.out
http://blytkerchan.chez.tiscali.fr/cygcheck.out

HTH

rlc

NB: the reason I am not *attaching* the cygcheck output but putting it at 
a web location is because by far most people on this list won't be too 
interested by it, and it is a 23-K attachment. As this is the third one I 
would have sent today, that would have become annoying. If you want me to 
send it as an attachment anyway, please (feel free to) ask.



--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list