aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2025-03-31 22:09:17 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2025-03-31 23:15:14 +0900
commit236e865e204cc4d6acb100fe6cbe91ff0af8852d (patch)
tree035c1c64fef14c469e1b7ceddc28e449052faba4 /newlib/libc
parent7fc7d8b1d4e323a531ab2e71581263a0675072d8 (diff)
downloadnewlib-236e865e204cc4d6acb100fe6cbe91ff0af8852d.zip
newlib-236e865e204cc4d6acb100fe6cbe91ff0af8852d.tar.gz
newlib-236e865e204cc4d6acb100fe6cbe91ff0af8852d.tar.bz2
Cygwin: pipe: Add workaround for native ninja
Native (non-cygwin) ninja creates pipe with size == 0, and starts cygwin process with that pipe. This causes infinite loop in the fhandler_fifo_pipe::raw_write(). Ideally, the pipe implementation in cygwin could work even with pipe size == 0, however, it seems impossible due to: (1) select() does not work for that pipe because PeekNamedPipe() always returns 0. Read side is ready to read only when the write side is about to write, but there is no way to know that. (2) The cause of the problem: https://cygwin.com/pipermail/cygwin/2025-January/257143.html cannot be avoidable. To avoid CancelIo() problem, the patch https://cygwin.com/pipermail/cygwin-patches/2025q1/013451.html restricts the data size less than the current pipe space. However, if pipe size is zero this is impossible. This patch adds just a workaround for native ninja that avoid infinite loop in raw_write(). Addresses: https://github.com/msys2/msys2-runtime/issues/270 Reported-by: Christoph Reiter <reiter.christoph@gmail.com> Co-authored-by: Johannes Schindelin <johannes.schindelin@gmx.de> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'newlib/libc')
0 files changed, 0 insertions, 0 deletions