I'm porting some code from POSIX to Windows. Fairly simple: poll(2) on STDIN_FILENO and on an FD for a UART. Set .events and check .revents. read() / write().
On Windows this involves waiting for events on handles, which is fine. Except, the wait-for-multiple interface only informs of the first event, so either the event list must be rebuilt without the event, or each subsequent event must be checked on it's own using the wait-single interface. This seems complex with no apparent benefit.
On Windows checking stdin seems to involve a special Console API which seems to provide "almost-fgets(STDIN_FILENO)" via ConsoleRead() , but I also seem to have to handle "CR key-up", and other keys, e.g. ctrl, also seems to generate unhandled events that must be peeked and discarded with ConsoleReadInput() to avoid blocking in ConsoleRead().
The UART is a whole other story, or rather more of the same. Everyone seems to say you need to use threads that block and then communicate using control events or use "async / overlapped IO" but my entire application is single threaded, and adding multiple new classes of software bugs to interface with a UART in 2026 seems nuts.

