Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fe91dac

Browse files
enhance: call FreeConsole after process killed on Windows (#1012)
Signed-off-by: leo <longshuang@msn.cn>
1 parent 76ab7d2 commit fe91dac

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/Native/Windows.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,6 @@ public void TerminateSafely(Process process)
234234
// Only one process can be terminated at a time
235235
lock (_lockTerminateProcessRequest)
236236
{
237-
FreeConsole();
238-
239237
if (AttachConsole(process.Id))
240238
{
241239
SetConsoleCtrlHandler(IntPtr.Zero, true);
@@ -248,6 +246,7 @@ public void TerminateSafely(Process process)
248246
{
249247
// DO NOTHING
250248
}
249+
FreeConsole();
251250
SetConsoleCtrlHandler(IntPtr.Zero, false);
252251
}
253252
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /