Global (Windows): prefers NtWaitForSingleObject

This commit is contained in:
李通洲
2026-03-14 23:08:25 +08:00
parent f46e97fc62
commit 81984e6e97
4 changed files with 5 additions and 6 deletions
+2 -2
View File
@@ -455,10 +455,10 @@ const char* ffGetTerminalResponse(const char* request, int nParams, const char*
while (true)
{
if (WaitForSingleObjectEx(hInput, FF_IO_TERM_RESP_WAIT_MS, TRUE) != WAIT_OBJECT_0)
if (NtWaitForSingleObject(hInput, TRUE, &(LARGE_INTEGER) { .QuadPart = (int64_t) FF_IO_TERM_RESP_WAIT_MS * -10000 }) != STATUS_WAIT_0)
{
SetConsoleMode(hInput, inputMode);
return "WaitForSingleObject() failed or timeout";
return "NtWaitForSingleObject() failed or timeout";
}
// Ignore all unexpected input events
+1 -1
View File
@@ -179,7 +179,7 @@ const char* ffProcessReadOutput(FFProcessHandle* handle, FFstrbuf* buffer)
default:
CancelIo(hChildPipeRead);
TerminateProcess(hProcess, 1);
return "WaitForSingleObject(hReadEvent) failed";
return "NtWaitForSingleObject(hReadEvent) failed";
}
}