Index: tools/lldb-mi/MICmnStreamStdin.cpp =================================================================== --- tools/lldb-mi/MICmnStreamStdin.cpp +++ tools/lldb-mi/MICmnStreamStdin.cpp @@ -14,6 +14,11 @@ #include "MICmnLog.h" #include "MIDriver.h" #include "MIUtilSingletonHelper.h" + +// Third Party Headers +#ifdef _MSC_VER +#include +#endif #include // For std::strerror() //++ ------------------------------------------------------------------------------------ @@ -206,6 +211,12 @@ const MIchar *pText = ::fgets(&m_pCmdBuffer[0], m_constBufferSize, stdin); if (pText == nullptr) { +#ifdef _MSC_VER + // Was Ctrl-C hit? + // On Windows, Ctrl-C gives an ERROR_OPERATION_ABORTED as error on the command-line. + if (::GetLastError() == ERROR_OPERATION_ABORTED) + return nullptr; +#endif if (::feof(stdin)) { const bool bForceExit = true; Index: tools/lldb-mi/Platform.cpp =================================================================== --- tools/lldb-mi/Platform.cpp +++ tools/lldb-mi/Platform.cpp @@ -23,7 +23,7 @@ { if (_ctrlHandler != NULL) { - _ctrlHandler(0); + _ctrlHandler(SIGINT); return TRUE; } return FALSE;