Skip to content

Commit 010b696

Browse files
aamCommit Queue
authored andcommitted
[win/signal] Disable ctrl-c handling in the parent dartdev process.
Ensure that ctrl-c is handled by spawned dartvm.exe process, parent dart.exe does not get in a way of handling ctrl-c, exits only after spawned dartvm.exe exits. Fixes #61399 TEST=manually on windows Change-Id: Ibdbfbb5e4863c76bbbf2e30fb2d94f72a2676d4a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/446704 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
1 parent 12a90b6 commit 010b696

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

runtime/bin/process_win.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1042,6 +1042,8 @@ int Process::Exec(Namespace* namespc,
10421042
// Now wait for this child process to terminate (normal exit or crash).
10431043
HANDLE child_process = starter.child_process_handle_;
10441044
ASSERT(child_process != INVALID_HANDLE_VALUE);
1045+
// Don't attempt to handle ctrl-c events, let spawned child handle them.
1046+
SetConsoleCtrlHandler(NULL, TRUE);
10451047
DWORD wait_result = WaitForSingleObject(child_process, INFINITE);
10461048
if (wait_result != WAIT_OBJECT_0) {
10471049
BufferFormatter f(errmsg, errmsg_len);

0 commit comments

Comments
 (0)