bonefish+mmlr:

As (our) gcc unfortunately uses atexit() to clean up lazily initialized static
variables inside functions we have to ensure that we do the right thing with
unloadable shared objects. In case a shared object was unloaded that installed
an atexit() hook the application would crash on exit. We now implement a
callback into libroot that is used to call all the atexit() hooks of a
component that is to be unloaded. Most prominently this fixes the media_server
crash at shutdown.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23486 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz
2008-01-13 12:08:34 +00:00
parent c4bf6940f5
commit 8c2a9d7433
5 changed files with 107 additions and 10 deletions
+2
View File
@@ -41,6 +41,8 @@ struct rld_export {
status_t (*reinit_after_fork)();
void (*call_atexit_hooks_for_range)(addr_t start, addr_t size);
const struct user_space_program_args *program_args;
};