mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-03-02 13:05:42 +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
24491c1251
commit
576ace1f2f
@ -449,7 +449,7 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (len <= pipe_buf_size)
|
if (len <= pipe_buf_size || pipe_buf_size == 0)
|
||||||
chunk = len;
|
chunk = len;
|
||||||
else if (is_nonblocking ())
|
else if (is_nonblocking ())
|
||||||
chunk = len = pipe_buf_size;
|
chunk = len = pipe_buf_size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user