diff options
author | Brad King <brad.king@kitware.com> | 2016-09-20 13:04:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-09-20 13:04:14 (GMT) |
commit | 3876e2976ed5ca7b2505decb22b3b001944fd027 (patch) | |
tree | 4d274266e244d5ed8ba0495d141a2c11e091b651 /Source/kwsys/testConsoleBufChild.cxx | |
parent | 6b8812c27e6df1d10fa4bfc30cb3eadd08d7966b (diff) | |
parent | 9783ed1e6eaf87bea54633599a2025026343bbc9 (diff) | |
download | CMake-3876e2976ed5ca7b2505decb22b3b001944fd027.zip CMake-3876e2976ed5ca7b2505decb22b3b001944fd027.tar.gz CMake-3876e2976ed5ca7b2505decb22b3b001944fd027.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2016-09-20 (3f69ac40)
Diffstat (limited to 'Source/kwsys/testConsoleBufChild.cxx')
-rw-r--r-- | Source/kwsys/testConsoleBufChild.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/kwsys/testConsoleBufChild.cxx b/Source/kwsys/testConsoleBufChild.cxx index 3b9ab71..2da39f2 100644 --- a/Source/kwsys/testConsoleBufChild.cxx +++ b/Source/kwsys/testConsoleBufChild.cxx @@ -42,16 +42,18 @@ int main(int argc, const char* argv[]) } std::string input; - HANDLE syncEvent = OpenEventW(EVENT_MODIFY_STATE, FALSE, SyncEventName); - if (syncEvent) { - SetEvent(syncEvent); + HANDLE event = OpenEventW(EVENT_MODIFY_STATE, FALSE, BeforeInputEventName); + if (event) { + SetEvent(event); + CloseHandle(event); } std::cin >> input; std::cout << input << std::endl; - if (syncEvent) { - SetEvent(syncEvent); - CloseHandle(syncEvent); + event = OpenEventW(EVENT_MODIFY_STATE, FALSE, AfterOutputEventName); + if (event) { + SetEvent(event); + CloseHandle(event); } #else static_cast<void>(argc); |