diff options
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/fhandler/pipe.cc | 5 | ||||
-rw-r--r-- | winsup/cygwin/select.cc | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler/pipe.cc b/winsup/cygwin/fhandler/pipe.cc index ac8bbe7..e35d523 100644 --- a/winsup/cygwin/fhandler/pipe.cc +++ b/winsup/cygwin/fhandler/pipe.cc @@ -455,6 +455,11 @@ fhandler_pipe_fifo::raw_write (const void *ptr, size_t len) ssize_t avail = pipe_buf_size; bool real_non_blocking_mode = false; + /* Workaround for native ninja. Native ninja creates pipe with size == 0, + and starts cygwin process with that pipe. */ + if (avail == 0) + avail = PIPE_BUF; + if (pipe_mtx) /* pipe_mtx is NULL in the fifo case */ { DWORD timeout = is_nonblocking () ? 0 : INFINITE; diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 422c8e8..bb141b0 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -670,7 +670,9 @@ pipe_data_available (int fd, fhandler_base *fh, HANDLE h, int mode) fpli.WriteQuotaAvailable); return fpli.WriteQuotaAvailable; } - /* TODO: Buffer really full or non-Cygwin reader? */ + return PIPE_BUF; /* Workaround for native ninja. Native ninja creates + pipe with size == 0, and starts cygwin process + with that pipe. */ } else if (fpli.ReadDataAvailable) { |