libc: call 'genode_exit()' in '_exit()'

With this patch the libc '_exit()' function calls the 'genode_exit()'
function to get the registered exit handlers called.

Fixes #308.
This commit is contained in:
Christian Prochaska 2012-07-30 21:12:59 +02:00 committed by Norman Feske
parent 23f11a4dca
commit 4caaba64c3

View File

@ -15,10 +15,11 @@
#include <base/sleep.h>
#include <base/printf.h>
extern void genode_exit(int status) __attribute__((noreturn));
extern "C" void _exit(int status)
{
Genode::env()->parent()->exit(status);
Genode::sleep_forever();
genode_exit(status);
}