This is the mail archive of the
cygwin-developers@cygwin.com
mailing list for the Cygwin project.
Re: Protected handle errors
- From: Christopher Faylor <cgf at redhat dot com>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 3 Jul 2002 14:58:02 -0400
- Subject: Re: Protected handle errors
- References: <05bd01c222c2$e398d8c0$6132bc3e@BABEL>
- Reply-to: cygwin-developers at cygwin dot com
On Wed, Jul 03, 2002 at 07:53:15PM +0100, Conrad Scott wrote:
>A while ago I posted that I was seeing lots of messages like the
>following when running a cygwin DLL compiled with --enable-debugging:
>
>19791 [main] sh 1316 mark_closed: attempt to close protected handle
>void memory_init():155(cygwin_mount_h<0x150>)
>24806 [main] sh 1316 mark_closed: by int
>fhandler_base::close():763(get_handle()<0x150>)
>
>I've changed the cygserver client code so the DLL no longer connects
>to cygserver at start-up; rather it now delays making a connection
>until (and only if) the client actually requires some cygserver
>functionality. Hey presto! I stop seeing these messages. To be
>accurate, I only see them in processes that *do* connect to cygserver
>for, e.g., tty handle duplication.
>
>Since I'm also getting some intermittent problems with clients
>connecting to cygserver, I thought I ought to investigate this now I
>know it's related to cygserver. Has anyone got any pointers or
>suggestions before I go and dive in? I assume that the cygserver
>client code should be doing something with the IPC handles that it's
>presently not doing.
Just calling ProtectHandle or ProtectHandle1 on any handles you
create should be sufficient.
cgf