[PATCH] dtors run twice on dll detach (update)

Robert Collins robert.collins@itdomain.com.au
Fri Apr 19 17:17:00 GMT 2002

> -----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
Once trigger is via atexit - when the program exits. The other is at dll

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.


More information about the Cygwin-patches mailing list