aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/local_includes
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2024-03-11 22:08:00 +0900
committerTakashi Yano <takashi.yano@nifty.ne.jp>2024-03-12 10:17:40 +0900
commitfc691d0246b95807cd2fac83cceb8053fc295eb2 (patch)
tree0a9fbd5db6c94690b4d662e3d6d95ca8a997ad71 /winsup/cygwin/local_includes
parent3af5d2bbdde00dc9443588f9a3938e6a862c85b4 (diff)
downloadnewlib-fc691d0246b95807cd2fac83cceb8053fc295eb2.zip
newlib-fc691d0246b95807cd2fac83cceb8053fc295eb2.tar.gz
newlib-fc691d0246b95807cd2fac83cceb8053fc295eb2.tar.bz2
Cygwin: pipe: Make sure to set read pipe non-blocking for cygwin apps.
If pipe reader is a non-cygwin app first, and cygwin process reads the same pipe after that, the pipe has been set to bclocking mode for the cygwin app. However, the commit 9e4d308cd592 assumes the pipe for cygwin process always is non-blocking mode. With this patch, the pipe mode is reset to non-blocking when cygwin app is started. Addresses: https://cygwin.com/pipermail/cygwin/2024-March/255644.html Fixes: 9e4d308cd592 ("Cygwin: pipe: Adopt FILE_SYNCHRONOUS_IO_NONALERT flag for read pipe.") Reported-by: wh <wh9692@protonmail.com> Reviewed-by: Corinna Vinschen <corinna@vinschen.de> Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'winsup/cygwin/local_includes')
-rw-r--r--winsup/cygwin/local_includes/fhandler.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/local_includes/fhandler.h b/winsup/cygwin/local_includes/fhandler.h
index 8729eb2..d9e0a01 100644
--- a/winsup/cygwin/local_includes/fhandler.h
+++ b/winsup/cygwin/local_includes/fhandler.h
@@ -1234,6 +1234,7 @@ public:
int open (int flags, mode_t mode = 0);
bool open_setup (int flags);
void fixup_after_fork (HANDLE);
+ void fixup_after_exec ();
int dup (fhandler_base *child, int);
void set_close_on_exec (bool val);
int close ();
@@ -1295,6 +1296,8 @@ public:
}
return false;
}
+ static void spawn_worker (int fileno_stdin, int fileno_stdout,
+ int fileno_stderr);
};
#define CYGWIN_FIFO_PIPE_NAME_LEN 47