mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
win: open child stdio handles in overlapped-mode (#8113)
This will be used e.g. by the python client for native asyncio support
This commit is contained in:
committed by
Justin M. Keyes
parent
a369385009
commit
009ccfe170
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user