[PATCH 3/4] server: Don't block when writing to named pipes in PIPE_NOWAIT mode.
Jacek Caban
jacek at codeweavers.com
Thu Oct 3 07:01:51 CDT 2019
Hi Brendan,
On 10/3/19 12:45 AM, Brendan Shanks wrote:
> Hi Jacek,
> In v2 of the patch I added a test for this (an overlapped read followed by a nonblocking write larger than the pipe buffer), on Wine the write was returning with 0 bytes written. My fix was to only do the wake/free from reselect_write_queue() if there’s no asyncs waiting in the reader read_q, not sure if this is correct or I’m overlooking something though.
Tests looks much better now, thanks. Implementation seems questionable
because non-blocking write may block now. For an example do a pending
read with size 1 followed by write of size 514. I'd expect write to fail
and read to not be satisfied on Windows. I think that with your
implementation, read will be satisfied and write will block.
Jacek
More information about the wine-devel
mailing list