Module: wine Branch: master Commit: adb0703cffbab688759645d57db68bc0d1423cf2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=adb0703cffbab688759645d57d...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Nov 1 11:28:38 2010 +0100
ntdll: Don't try to join with the main thread.
---
dlls/ntdll/thread.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index bd24aa0..fb6b2d2 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -356,8 +356,11 @@ void exit_thread( int status ) { struct ntdll_thread_data *thread_data = (struct ntdll_thread_data *)teb->SpareBytes1;
- pthread_join( thread_data->pthread_id, NULL ); - signal_free_thread( teb ); + if (thread_data->pthread_id) + { + pthread_join( thread_data->pthread_id, NULL ); + signal_free_thread( teb ); + } }
close( ntdll_get_thread_data()->wait_fd[0] );