Alex Henrie alexhenrie24@gmail.com writes:
Cc: Eric Pouech eric.pouech@orange.fr Cc: Sebastian Lackner sebastian@fds-team.de
Fixes https://bugs.winehq.org/show_bug.cgi?id=39875
avail_mode controls whether a read operation is considered a success as long as at least one byte can be read, or whether the operation is considered pending until the total number of requested bytes has been received. For serial ports, avail_mode was TRUE if read operations always finished immediately, and FALSE if read operations did not finish until data was available or the request timed out.[1] However, whether or not a zero-byte read is considered a success has nothing to do with whether or not a one-byte read is considered a success.
Since serial ports are essentially hardware-based pipes, it makes sense that they behave the same as software pipes and sockets.
Pipes and sockets don't have comm timeouts, it's not at all obvious that they should be identical. This will need tests; at the very least a test app, if using the testbot isn't possible.