From 009ccfe170ada2c78ca7feabda567a7e901fb30b Mon Sep 17 00:00:00 2001 From: Björn Linse Date: Wed, 25 Apr 2018 10:11:08 +0200 Subject: win: open child stdio handles in overlapped-mode (#8113) This will be used e.g. by the python client for native asyncio support --- src/nvim/event/libuv_process.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/nvim/event/libuv_process.c b/src/nvim/event/libuv_process.c index 0c2bf397e5..ffe2db9b76 100644 --- a/src/nvim/event/libuv_process.c +++ b/src/nvim/event/libuv_process.c @@ -51,12 +51,19 @@ int libuv_process_spawn(LibuvProcess *uvproc) if (!proc->in.closed) { uvproc->uvstdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; +#ifdef WIN32 + uvproc->uvstdio[0].flags |= UV_OVERLAPPED_PIPE; +#endif uvproc->uvstdio[0].data.stream = STRUCT_CAST(uv_stream_t, &proc->in.uv.pipe); } if (!proc->out.closed) { uvproc->uvstdio[1].flags = UV_CREATE_PIPE | UV_WRITABLE_PIPE; +#ifdef WIN32 + // pipe must be readable for IOCP to work. + uvproc->uvstdio[1].flags |= UV_READABLE_PIPE | UV_OVERLAPPED_PIPE; +#endif uvproc->uvstdio[1].data.stream = STRUCT_CAST(uv_stream_t, &proc->out.uv.pipe); } -- cgit