Vincent Povirk : mscoree: Don't return from _CorExeMain.

Alexandre Julliard julliard at winehq.org
Thu Apr 4 15:38:09 CDT 2019


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

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Thu Apr  4 10:21:59 2019 -0500

mscoree: Don't return from _CorExeMain.

Testing on Windows shows that unmanaged threads do not keep the
process open after a .NET program's entry point and all .NET
foreground threads have exited.

Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/mscoree/corruntimehost.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c
index ca8ba0d..95f6a9a 100644
--- a/dlls/mscoree/corruntimehost.c
+++ b/dlls/mscoree/corruntimehost.c
@@ -1524,6 +1524,8 @@ __int32 WINAPI _CorExeMain(void)
         mono_runtime_quit();
     }
 
+    ExitProcess(exit_code);
+
     return exit_code;
 }
 




More information about the wine-cvs mailing list