We need to let the runtime loader call shared object termination hooks

from exit().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27991 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-10-12 12:26:27 +00:00
parent 260da902db
commit c73aeac11e
3 changed files with 12 additions and 4 deletions

View File

@ -46,6 +46,8 @@ struct rld_export {
void (*call_atexit_hooks_for_range)(addr_t start, addr_t size);
void (*call_termination_hooks)();
const struct user_space_program_args *program_args;
};

View File

@ -8,12 +8,15 @@
*/
#include <syscalls.h>
#include <SupportDefs.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <limits.h>
#include <SupportDefs.h>
#include <syscalls.h>
#include <user_runtime.h>
extern void _IO_cleanup(void);
@ -144,6 +147,8 @@ exit(int status)
// close all open files
_IO_cleanup();
__gRuntimeLoader->call_termination_hooks();
// exit with status code
_kern_exit_team(status);
}

View File

@ -37,7 +37,8 @@ struct rld_export gRuntimeLoader = {
get_next_image_dependency,
elf_reinit_after_fork,
NULL // call_atexit_hooks_for_range
NULL, // call_atexit_hooks_for_range
terminate_program
};