diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2021-11-17 11:08:05 +0300 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2021-12-12 16:14:29 +0300 |
commit | 90788821b7d8f48e7f5e31fed68e54856a97b577 (patch) | |
tree | aaf1292a5e3763196d95f81515f5b6c718fb747a | |
parent | 451bbfb9f3313b9645f19e9df62e2c508f701759 (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.cc | 3 |
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)) |