Alexandre Julliard : ntdll: Unblock signals in process init only after the dlls have been imported.
Alexandre Julliard
julliard at winehq.org
Mon Nov 19 08:19:52 CST 2007
Module: wine
Branch: master
Commit: 0f5fc117a2320bb7e21b9ae4d07d717bed413171
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0f5fc117a2320bb7e21b9ae4d07d717bed413171
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Nov 19 14:27:07 2007 +0100
ntdll: Unblock signals in process init only after the dlls have been imported.
---
dlls/ntdll/loader.c | 6 ++++++
dlls/ntdll/server.c | 1 -
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 4d6b854..ca1ebdd 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -36,6 +36,7 @@
#include "wine/exception.h"
#include "wine/library.h"
+#include "wine/pthread.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/server.h"
@@ -52,6 +53,8 @@ WINE_DECLARE_DEBUG_CHANNEL(imports);
#define RT_MANIFEST ((ULONG_PTR)24)
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID ((ULONG_PTR)2)
+extern struct wine_pthread_functions pthread_functions;
+
typedef DWORD (CALLBACK *DLLENTRYPROC)(HMODULE,DWORD,LPVOID);
static int process_detaching = 0; /* set on process detach to avoid deadlocks with thread detach */
@@ -2314,6 +2317,9 @@ void WINAPI LdrInitializeThunk( ULONG unknown1, ULONG unknown2, ULONG unknown3,
if ((status = fixup_imports( wm, load_path )) != STATUS_SUCCESS) goto error;
if ((status = alloc_process_tls()) != STATUS_SUCCESS) goto error;
if ((status = alloc_thread_tls()) != STATUS_SUCCESS) goto error;
+
+ pthread_functions.sigprocmask( SIG_UNBLOCK, &server_block_set, NULL );
+
if ((status = process_attach( wm, (LPVOID)1 )) != STATUS_SUCCESS)
{
if (last_failed_modref)
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 33f81dc..1eebef1 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -1072,7 +1072,6 @@ NTSTATUS server_init_process_done(void)
}
SERVER_END_REQ;
- pthread_functions.sigprocmask( SIG_UNBLOCK, &server_block_set, NULL );
return status;
}
More information about the wine-cvs
mailing list