dlclose() vs fork()
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Mar 22 09:49:00 GMT 2017
On Mar 22 08:44, Alexey Sokolov wrote:
> Thanks Corinna for the quick fix,
> The user confirmed it's working now with the snapshot.
>
> 21.03.2017 13:42, Corinna Vinschen пишет:
> > On Mar 21 09:03, Alexey Sokolov wrote:
> > > Hello,
> > > If the same DLL is dlopen()ed several times, dlclose() will actually
> > > unload the DLL only after the same number of calls to dlclose().
> > >
> > > This works fine in cygwin, until we add fork().
> > >
> > > It looks like in the child process the counters of inherited DLLs are
> > > set to 1, so the first dlclose() unloads it, causing segfault for
> > > subsequent access to the unloaded code.
> > > https://github.com/znc/znc/issues/1385#issuecomment-288014319 has a
> > > working minimal example of this behavior.
> >
> > dlopen/dlclose reference counting was broken. I applied a fix and
> > uploaded new dev snapshots to https://cygwin.com/snapshots/
Thanks for testing and feedback.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20170322/2649a9d5/attachment.sig>
More information about the Cygwin
mailing list