From 392ad2822da8cad9aac55bcf327bb660f1f49b08 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sun, 17 Feb 2008 14:12:02 +0000 Subject: [PATCH] axeld + bonefish: BeOS R5's glue code incorrectly calls _thread_do_exit_notification() when main() returns, while Haiku does that in exit(). Therefore when terminating this way the exit hooks were called twice for executables built under BeOS R5. This caused e.g. NetPositive or the R5 svn to crash on exit (our network code actually uses those hooks). Fixes bug #1742. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23975 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/os/thread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/system/libroot/os/thread.c b/src/system/libroot/os/thread.c index c6e3c8d864..e07424eb1d 100644 --- a/src/system/libroot/os/thread.c +++ b/src/system/libroot/os/thread.c @@ -113,6 +113,8 @@ _thread_do_exit_notification(void) node = next; } + + tls_set(TLS_ON_EXIT_THREAD_SLOT, NULL); }