aboutsummaryrefslogtreecommitdiff
path: root/third-party/patches/libuv-overlapped.patch
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2018-04-25 10:11:08 +0200
committerJustin M. Keyes <justinkz@gmail.com>2018-04-25 10:11:08 +0200
commit009ccfe170ada2c78ca7feabda567a7e901fb30b (patch)
tree58dd035ff52f2020c06ca3add16b12d0c572fe48 /third-party/patches/libuv-overlapped.patch
parenta36938500988e3ba447332df99ed0057fea1ac00 (diff)
downloadrneovim-009ccfe170ada2c78ca7feabda567a7e901fb30b.tar.gz
rneovim-009ccfe170ada2c78ca7feabda567a7e901fb30b.tar.bz2
rneovim-009ccfe170ada2c78ca7feabda567a7e901fb30b.zip
win: open child stdio handles in overlapped-mode (#8113)
This will be used e.g. by the python client for native asyncio support
Diffstat (limited to 'third-party/patches/libuv-overlapped.patch')
-rw-r--r--third-party/patches/libuv-overlapped.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/third-party/patches/libuv-overlapped.patch b/third-party/patches/libuv-overlapped.patch
new file mode 100644
index 0000000000..f4ea19a146
--- /dev/null
+++ b/third-party/patches/libuv-overlapped.patch
@@ -0,0 +1,33 @@
+diff --git a/include/uv.h b/include/uv.h
+index cdd251d8..79b7930e 100644
+--- a/include/uv.h
++++ b/include/uv.h
+@@ -865,7 +865,8 @@ typedef enum {
+ * flags may be specified to create a duplex data stream.
+ */
+ UV_READABLE_PIPE = 0x10,
+- UV_WRITABLE_PIPE = 0x20
++ UV_WRITABLE_PIPE = 0x20,
++ UV_OVERLAPPED_PIPE = 0x40
+ } uv_stdio_flags;
+
+ typedef struct uv_stdio_container_s {
+diff --git a/src/win/process-stdio.c b/src/win/process-stdio.c
+index 032e3093..b53bdea7 100644
+--- a/src/win/process-stdio.c
++++ b/src/win/process-stdio.c
+@@ -131,12 +131,13 @@ static int uv__create_stdio_pipe_pair(uv_loop_t* loop,
+ sa.lpSecurityDescriptor = NULL;
+ sa.bInheritHandle = TRUE;
+
++ BOOL overlap = server_pipe->ipc || (flags & UV_OVERLAPPED_PIPE);
+ child_pipe = CreateFileA(pipe_name,
+ client_access,
+ 0,
+ &sa,
+ OPEN_EXISTING,
+- server_pipe->ipc ? FILE_FLAG_OVERLAPPED : 0,
++ overlap ? FILE_FLAG_OVERLAPPED : 0,
+ NULL);
+ if (child_pipe == INVALID_HANDLE_VALUE) {
+ err = GetLastError();