Date: Tue, 4 Feb 2003 10:25:13 -0600 From: Chip Norkus <wd@arpa.com> To: arch@freebsd.org Subject: Re: dlclose() vs. atexit() Message-ID: <20030204162513.GB22642@arpa.com> In-Reply-To: <200302041046.13767.mi%2Bmx@aldan.algebra.com> References: <200302030506.h1356Nha011918@repoman.freebsd.org> <1044319099.358.57.camel@zaphod.softweyr.com> <20030204082625.GB85104@elvis.mu.org> <200302041046.13767.mi%2Bmx@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue Feb 04, 2003; 10:46AM -0500 Mikhail Teterin propagated the following: [snip] > > Yet another plan would be to have the atexit() call simply increase the > ref-count of the library a handler is from, so it will not actually be > unloaded by dlclose(). But that will be yet another implementation... > I'm not sure this would be a good idea. I have a program which uses dynamic libraries to introduce code, and which can unload or reload them at any time and keep on running. I am especially worried about the reload case, because what often happens is that an old version of the .so is unloaded (dlclosed) and then a new version is loaded (dlopened). If the old version stays around, I'm afraid there would be some symbol collision. Correct me if I'm wrong, though. I think the Solaris approach you mentioned above is by far the best and most correct sounding approach. > -mi > -wd -- chip norkus; unix geek and programmer; wd@arpa.com "question = (to) ? be : !be;" --Shakespeare http://telekinesis.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030204162513.GB22642>