diff options
Diffstat (limited to 'src/vm/ceemain.cpp')
-rw-r--r-- | src/vm/ceemain.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/vm/ceemain.cpp b/src/vm/ceemain.cpp index b09d970947..20b579af9a 100644 --- a/src/vm/ceemain.cpp +++ b/src/vm/ceemain.cpp @@ -446,7 +446,13 @@ static BOOL WINAPI DbgCtrlCHandler(DWORD dwCtrlType) } else #endif // DEBUGGING_SUPPORTED - { + { + if (dwCtrlType == CTRL_CLOSE_EVENT) + { + // Initiate shutdown so the ProcessExit handlers run + ForceEEShutdown(SCA_ReturnWhenShutdownComplete); + } + g_fInControlC = true; // only for weakening assertions in checked build. return FALSE; // keep looking for a real handler. } |