Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-11-17 11:08:05 +0300
committerTakashi Yano <takashi.yano@nifty.ne.jp>2021-12-12 16:14:29 +0300
commit90788821b7d8f48e7f5e31fed68e54856a97b577 (patch)
treeaaf1292a5e3763196d95f81515f5b6c718fb747a
parent451bbfb9f3313b9645f19e9df62e2c508f701759 (diff)
Cygwin: pipe: Restore blocking mode for cygwin process at startup.topic/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 d57cbb355..e54db4446 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))