From 48cd67ebf8f4025ecd57b3c651cf62c0e102a0be Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Tue, 7 Aug 2018 17:56:07 +0200 Subject: [PATCH] Fix LyX server on Windows On some recent Windows versions, GetLastError() may also return NO_ERROR instead of ERROR_IO_PENDING during an overlapped write operation to a pipe. This was confusing the state machine in Server.cpp so that replies to commands were scheduled but were never actually output. (cherry picked from commit cf5f2661dc0a902e541704172ab369ba3e5a54d6) --- src/Server.cpp | 2 +- status.23x | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Server.cpp b/src/Server.cpp index d883850263..566f8f3344 100644 --- a/src/Server.cpp +++ b/src/Server.cpp @@ -356,7 +356,7 @@ bool LyXComm::pipeServer() error = GetLastError(); - if (success && error == ERROR_IO_PENDING) { + if (success && (error == ERROR_IO_PENDING || error == NO_ERROR)) { // The write operation is still pending. // We get here when a reader is started // well before a reply is ready, so delay diff --git a/status.23x b/status.23x index b7383bc111..f84c674866 100644 --- a/status.23x +++ b/status.23x @@ -299,6 +299,8 @@ What's new - When reconfiguring LyX, correctly detect commands specified with a full path with spaces (bug 11214). +- Fix the LyX server on Windows so that replies are actually output. + * DOCUMENTATION AND LOCALIZATION -- 2.39.5