aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/pty_process_win.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-11-26 10:18:01 +0100
committerGitHub <noreply@github.com>2017-11-26 10:18:01 +0100
commit207b7ca4bc16d52641eaa5244eef25a0dba91dbc (patch)
treea3422eceb6eeaa692a7baf7171dfa5fd81ad86b2 /src/nvim/os/pty_process_win.c
parentb57d9a4ff08fc1ef8db79d422b441b792493ff4e (diff)
parent0de019b6a65c6dd5141b7e002343df3689065ce7 (diff)
downloadrneovim-207b7ca4bc16d52641eaa5244eef25a0dba91dbc.tar.gz
rneovim-207b7ca4bc16d52641eaa5244eef25a0dba91dbc.tar.bz2
rneovim-207b7ca4bc16d52641eaa5244eef25a0dba91dbc.zip
Merge pull request #6844 from bfredl/channel
channels: support buffered output and bytes sockets/stdio
Diffstat (limited to 'src/nvim/os/pty_process_win.c')
-rw-r--r--src/nvim/os/pty_process_win.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/os/pty_process_win.c b/src/nvim/os/pty_process_win.c
index ef8a699c56..3c4839a076 100644
--- a/src/nvim/os/pty_process_win.c
+++ b/src/nvim/os/pty_process_win.c
@@ -44,7 +44,7 @@ int pty_process_spawn(PtyProcess *ptyproc)
wchar_t *cwd = NULL;
const char *emsg = NULL;
- assert(!proc->err);
+ assert(proc->err.closed);
cfg = winpty_config_new(WINPTY_FLAG_ALLOW_CURPROC_DESKTOP_CREATION, &err);
if (cfg == NULL) {
@@ -71,20 +71,20 @@ int pty_process_spawn(PtyProcess *ptyproc)
goto cleanup;
}
- if (proc->in != NULL) {
+ if (!proc->in.closed) {
in_req = xmalloc(sizeof(uv_connect_t));
uv_pipe_connect(
in_req,
- &proc->in->uv.pipe,
+ &proc->in.uv.pipe,
in_name,
pty_process_connect_cb);
}
- if (proc->out != NULL) {
+ if (!proc->out.closed) {
out_req = xmalloc(sizeof(uv_connect_t));
uv_pipe_connect(
out_req,
- &proc->out->uv.pipe,
+ &proc->out.uv.pipe,
out_name,
pty_process_connect_cb);
}
@@ -228,7 +228,7 @@ static void wait_eof_timer_cb(uv_timer_t *wait_eof_timer)
PtyProcess *ptyproc = wait_eof_timer->data;
Process *proc = (Process *)ptyproc;
- if (!proc->out || !uv_is_readable(proc->out->uvstream)) {
+ if (proc->out.closed || !uv_is_readable(proc->out.uvstream)) {
uv_timer_stop(&ptyproc->wait_eof_timer);
pty_process_finish2(ptyproc);
}