Wolfgang Walter <w...@stwm.de> writes: > @@ -201,7 +202,17 @@ static void serial_flush( struct fd *fd, struct event > **event ) > /* MSDN says: If hFile is a handle to a communications device, > * the function only flushes the transmit buffer. > */ > - if (tcflush( get_unix_fd(fd), TCOFLUSH ) == -1) file_set_error(); > + /* FlushFileBuffers does NOT have the semantics of tcflush. > + * Whereas tcflush discards any data not yet transmitted > + * FlushFileBuffers ensures they are written out. > + * The POSIX equivalent is tcdrain > + */ > + while (tcdrain( get_unix_fd(fd)) == -1) { > + if (errno != EINTR) { > + file_set_error(); > + return; > + }
This will block, you can't do that in the server. -- Alexandre Julliard julli...@winehq.org