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:
Takashi Yano 2021-11-11 12:30:24 +09:00
parent 08253fae73
commit 7c902b3c90
1 changed files with 1 additions and 1 deletions

View File

@ -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;