From fe4f00681e8e4f1c63ab253490af0d3acfd0262c Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 4 Apr 2019 10:21:59 -0500 Subject: [PATCH] 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 Signed-off-by: Alexandre Julliard --- dlls/mscoree/corruntimehost.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mscoree/corruntimehost.c b/dlls/mscoree/corruntimehost.c index ca8ba0dc01f..95f6a9a892e 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; }