]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: pipe: Restore blocking mode for cygwin process at startup. topic/pipe github/topic/pipe
authorTakashi Yano <takashi.yano@nifty.ne.jp>
Wed, 17 Nov 2021 08:08:05 +0000 (17:08 +0900)
committerTakashi Yano <takashi.yano@nifty.ne.jp>
Sun, 12 Dec 2021 13:14:29 +0000 (22:14 +0900)
- Set blocking mode properly at startup of cygwin process. This is
  needed if the cygwin process is executed from non-cygwin process.

winsup/cygwin/dtable.cc

index d57cbb355a39f2c1bcc8590ab9fe30b81203ba15..e54db4446c1a6784cd0bfc2e1832608c16d1ecd8 100644 (file)
@@ -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))
This page took 0.030653 seconds and 5 git commands to generate.