summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testConsoleBufChild.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/testConsoleBufChild.cxx')
-rw-r--r--Source/kwsys/testConsoleBufChild.cxx14
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);