ntdll: Unblock signals in process init only after the dlls have been imported.

This commit is contained in:
Alexandre Julliard 2007-11-19 14:27:07 +01:00
parent c70a17dbd9
commit 0f5fc117a2
2 changed files with 6 additions and 1 deletions

View File

@ -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)

View File

@ -1072,7 +1072,6 @@ NTSTATUS server_init_process_done(void)
}
SERVER_END_REQ;
pthread_functions.sigprocmask( SIG_UNBLOCK, &server_block_set, NULL );
return status;
}