Statically initialising pthread attributes in dynamic dlls.

Dave Korn dave.korn.cygwin@googlemail.com
Thu Feb 25 13:14:00 GMT 2010


On 24/02/2010 21:44, Christopher Faylor wrote:

> Hmm.  That would presumably cause the behavior that Dave Korn noted of
> removing the handler after FreeLibrary returns.  So you'd have to put it
> there and in dlclose.  

  The temporary handler in dll_dllcrt0_1 approach seems an awful lot simpler
and more reliable to me than all this tedious mucking about in hyperspace...
erm, I mean all this tedious unlinking and relinking the chain and hoping
nothing bad happens during the window when we have no handler installed at
all.  Why don't we just fix it this way instead?

winsup/cygwin/ChangeLog:

	* dll_init.cc (dll_dllcrt0_1): Install a temporary SEH frame instead
	of redirecting the global registration.
	* dlfcn.cc (dlopen): Revert last change rendered superfluous by the
	above.

    cheers,
      DaveK

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlopen-seh-fix.diff
Type: text/x-c
Size: 4306 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20100225/d3265835/attachment.bin>


More information about the Cygwin-patches mailing list