Date: Sun, 4 Feb 2001 12:28:16 -0800 (PST) From: Matt Dillon <dillon@earth.backplane.com> To: Brian McGovern <mcgovern@spoon.beta.com> Cc: hackers@FreeBSD.ORG Subject: Re: exit() does not do dlclose()? Message-ID: <200102042028.f14KSGD16125@earth.backplane.com> References: <200102041654.f14Gsh808001@spoon.beta.com>
index | next in thread | previous in thread | raw e-mail
:I'm playing with an application that uses dlopen() to load some libraries. I
:use the _init function to set the libraries up. I've also set up the _fini
:functions to shut things down.
:
:I see, in the man page, that dlclose() will unload the libraries and call
:_fini.
:
:My question is whether or not exit() does the same thing? It currently does
:not appear to, although that would seem rather odd to me, given the other
:types of cleanup it does.
:
:Is this due to the fact that dlopen() bypasses the 'normal' loader, and
:therefore the cleanup routines can not understand how to get rid of them
:correctly?
:
: -Brian
What happens if the exit code needs information stored in the library
it is trying to close? For example, like atexit() code?
If a program is exiting, there is no real need to close any loaded
libraries since they will be wiped when the VM context goes away.
-Matt
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102042028.f14KSGD16125>
