mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-04 14:06:13 +08:00
Cygwin: pipe: Fix raw_write() for non-cygwin pipe with size zero.
- Currently, raw_write() fails to handle size zero pipe which may be created by non-cygwin apps (e.g. Windows native ninja). This patch fixes the issue. Addresses: https://cygwin.com/pipermail/cygwin/2021-November/249844.html
This commit is contained in:
parent
08253fae73
commit
7c902b3c90
@ -449,7 +449,7 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (len <= pipe_buf_size)
|
||||
if (len <= pipe_buf_size || pipe_buf_size == 0)
|
||||
chunk = len;
|
||||
else if (is_nonblocking ())
|
||||
chunk = len = pipe_buf_size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user