aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os/pty_process_unix.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2017-08-27 11:59:33 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2017-11-24 14:50:00 +0100
commit5215e3205a07b85e4e4cf1f8a8ca6be2b9556459 (patch)
tree515ccc2d01935465edd71f1d66f526be7dc66cfc /src/nvim/os/pty_process_unix.c
parent3717e2157f2d45ce23dbe4ac03085fea2d956dc4 (diff)
downloadrneovim-5215e3205a07b85e4e4cf1f8a8ca6be2b9556459.tar.gz
rneovim-5215e3205a07b85e4e4cf1f8a8ca6be2b9556459.tar.bz2
rneovim-5215e3205a07b85e4e4cf1f8a8ca6be2b9556459.zip
channels: refactor
Diffstat (limited to 'src/nvim/os/pty_process_unix.c')
-rw-r--r--src/nvim/os/pty_process_unix.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c
index ee3ab96a83..e39f837c1a 100644
--- a/src/nvim/os/pty_process_unix.c
+++ b/src/nvim/os/pty_process_unix.c
@@ -47,7 +47,7 @@ int pty_process_spawn(PtyProcess *ptyproc)
int status = 0; // zero or negative error code (libuv convention)
Process *proc = (Process *)ptyproc;
- assert(!proc->err);
+ assert(proc->err.closed);
uv_signal_start(&proc->loop->children_watcher, chld_handler, SIGCHLD);
ptyproc->winsize = (struct winsize){ ptyproc->height, ptyproc->width, 0, 0 };
uv_disable_stdio_inheritance();
@@ -83,12 +83,12 @@ int pty_process_spawn(PtyProcess *ptyproc)
goto error;
}
- if (proc->in
- && (status = set_duplicating_descriptor(master, &proc->in->uv.pipe))) {
+ if (!proc->in.closed
+ && (status = set_duplicating_descriptor(master, &proc->in.uv.pipe))) {
goto error;
}
- if (proc->out
- && (status = set_duplicating_descriptor(master, &proc->out->uv.pipe))) {
+ if (!proc->out.closed
+ && (status = set_duplicating_descriptor(master, &proc->out.uv.pipe))) {
goto error;
}