This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
RE: [PATCH] dtors run twice on dll detach (update)
- From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
- To: "Robert Collins" <robert dot collins at itdomain dot com dot au>,<cygwin-patches at cygwin dot com>
- Date: Thu, 25 Apr 2002 12:34:33 +1000
- Subject: RE: [PATCH] dtors run twice on dll detach (update)
> -----Original Message-----
> From: Robert Collins
> Sent: Saturday, April 20, 2002 10:18 AM
> To: Robert Collins; cygwin-patches@cygwin.com
> Subject: RE: [PATCH] dtors run twice on dll detach (update)
>
>
>
>
> > -----Original Message-----
> > From: Robert Collins
> > Sent: Saturday, April 20, 2002 8:05 AM
> >
> > Ookay. I don't think that either function is obsolete... and
> > neither you nor Corinna had commented.
>
> I should enlarge on this.
>
> The reason that I don't think that either function is obsolete is as
> follows:
> Once trigger is via atexit - when the program exits. The
> other is at dll detachment.
>
> Now the double-dtor run does not occur under gdb or strace.
> This suggests to me that the dll detachment does not occur in
> these situations (or that atexit does not run).
>
> Also, atexit will call all the dtors before any dll's detach,
> which could be important. So that should stay.
>
> Conversely, dlopened dll's should have their dtors called
> when they are dlclosed, so the dll_detach invocation should stay.
So... as this has been contentious: Chris/Corinna - any objection to my
recommitting it?
Rob