From 5c3fd8af1da93fd2400795126ffa2c86dbaac73c Mon Sep 17 00:00:00 2001 From: joost Date: Mon, 9 Jun 2014 09:33:32 +0000 Subject: [PATCH] FpDebugger (pure): Let the kernel close the debug-handle after an application has quit. (bug #25986) git-svn-id: trunk@45423 - --- components/fpdebug/fpdbgwinclasses.pas | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/fpdebug/fpdbgwinclasses.pas b/components/fpdebug/fpdbgwinclasses.pas index af9772bc60..ffbd80bec7 100644 --- a/components/fpdebug/fpdbgwinclasses.pas +++ b/components/fpdebug/fpdbgwinclasses.pas @@ -284,7 +284,6 @@ end; destructor TDbgWinProcess.Destroy; begin - CloseHandle(FInfo.hProcess); FInfo.hProcess:=0; FProcProcess.Free; inherited Destroy; @@ -853,6 +852,9 @@ begin EXIT_PROCESS_DEBUG_EVENT: begin //DumpEvent('EXIT_PROCESS_DEBUG_EVENT'); SetExitCode(MDebugEvent.ExitProcess.dwExitCode); + // Let the kernel close all debug-handles and close-up the + // debuggee. + Windows.ContinueDebugEvent(MDebugEvent.dwProcessId, MDebugEvent.dwThreadId, DBG_CONTINUE); result := deExitProcess; end; LOAD_DLL_DEBUG_EVENT: begin