aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-11-17 17:08:05 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-12 22:14:29 +0900
commit90788821b7d8f48e7f5e31fed68e54856a97b577 (patch)
treeaaf1292a5e3763196d95f81515f5b6c718fb747a
parent451bbfb9f3313b9645f19e9df62e2c508f701759 (diff)
downloadnewlib-topic/pipe.zip
newlib-topic/pipe.tar.gz
newlib-topic/pipe.tar.bz2
Cygwin: pipe: Restore blocking mode for cygwin process at startup.github/topic/pipetopic/pipe
- Set blocking mode properly at startup of cygwin process. This is needed if the cygwin process is executed from non-cygwin process.
-rw-r--r--winsup/cygwin/dtable.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc
index d57cbb3..e54db44 100644
--- a/winsup/cygwin/dtable.cc
+++ b/winsup/cygwin/dtable.cc
@@ -410,6 +410,9 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
{
fhandler_pipe *fhp = (fhandler_pipe *) fh;
fhp->set_pipe_buf_size ();
+ /* Set read pipe always to nonblocking */
+ fhp->set_pipe_non_blocking (fhp->get_device () == FH_PIPER ?
+ true : fhp->is_nonblocking ());
}
if (!fh->open_setup (openflags))