Alexandre Julliard : ntdll: Make sure we don't try to attach the main exe a second time.

Alexandre Julliard julliard at winehq.org
Tue Apr 21 15:59:46 CDT 2020


Module: wine
Branch: master
Commit: 0a72ec1dacb59c72980c3133fddf316377349048
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=0a72ec1dacb59c72980c3133fddf316377349048

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 21 11:23:15 2020 +0200

ntdll: Make sure we don't try to attach the main exe a second time.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48961
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ntdll/loader.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index b0d5cf46a5..4868919b0b 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -4009,6 +4009,7 @@ void WINAPI LdrInitializeThunk( CONTEXT *context, void **entry, ULONG_PTR unknow
             NtTerminateProcess( GetCurrentProcess(), status );
         }
         wm->ldr.LoadCount = -1;
+        wm->ldr.Flags |= LDR_PROCESS_ATTACHED;  /* don't try to attach again */
         if (wm->ldr.ActivationContext)
             RtlActivateActivationContext( 0, wm->ldr.ActivationContext, &cookie );
 




More information about the wine-cvs mailing list