diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/os_calls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index e236088c..095ff4fd 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -590,8 +590,11 @@ int g_thread_create(unsigned long (__stdcall * start_routine)(void*), void* arg) int g_thread_create(void* (* start_routine)(void*), void* arg) { pthread_t thread; + int rv; - return pthread_create(&thread, 0, start_routine, arg); + rv = pthread_create(&thread, 0, start_routine, arg); + pthread_detach(thread); + return rv; } #endif |