From 4caaba64c32f6cb89d3297c439d21d829300880b Mon Sep 17 00:00:00 2001 From: Christian Prochaska Date: Mon, 30 Jul 2012 21:12:59 +0200 Subject: [PATCH] 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. --- libports/src/lib/libc/exit.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libports/src/lib/libc/exit.cc b/libports/src/lib/libc/exit.cc index 124a5096a8..ab48291905 100644 --- a/libports/src/lib/libc/exit.cc +++ b/libports/src/lib/libc/exit.cc @@ -15,10 +15,11 @@ #include #include +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); }