diff options
author | Nico Weber <thakis@chromium.org> | 2014-05-13 19:58:01 (GMT) |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2014-05-13 19:58:01 (GMT) |
commit | 6d5cdede695cd08064f9b7e76b7e4b77a5a78c0c (patch) | |
tree | 1e9783997067b388fdb965dd96810a27ae5c8d27 | |
parent | c57b771cc3e86f80bf16d36eb1b1f3ab2ddde1de (diff) | |
download | Ninja-6d5cdede695cd08064f9b7e76b7e4b77a5a78c0c.zip Ninja-6d5cdede695cd08064f9b7e76b7e4b77a5a78c0c.tar.gz Ninja-6d5cdede695cd08064f9b7e76b7e4b77a5a78c0c.tar.bz2 |
win console wip: ctrl-c should reach commands running in console pools
-rw-r--r-- | src/subprocess-win32.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc index c71f95b..59b2d37 100644 --- a/src/subprocess-win32.cc +++ b/src/subprocess-win32.cc @@ -101,10 +101,13 @@ bool Subprocess::Start(SubprocessSet* set, const string& command) { PROCESS_INFORMATION process_info; memset(&process_info, 0, sizeof(process_info)); + // Ninja handles ctrl-c, except for subprocesses in console pools. + DWORD process_flags = use_console_ ? 0 : CREATE_NEW_PROCESS_GROUP; + // Do not prepend 'cmd /c' on Windows, this breaks command // lines greater than 8,191 chars. if (!CreateProcessA(NULL, (char*)command.c_str(), NULL, NULL, - /* inherit handles */ TRUE, CREATE_NEW_PROCESS_GROUP, + /* inherit handles */ TRUE, process_flags, NULL, NULL, &startup_info, &process_info)) { DWORD error = GetLastError(); |