diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-12-14 00:24:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-14 00:24:35 +0100 |
commit | 6ff13d78b7eb0a1fae2e2e8cdd054072e1467158 (patch) | |
tree | e52065c81ca5caec6370def83147094e6e93917d /src/nvim/os/pty_process_unix.c | |
parent | 7164f618504bb1b3374da1bcc26c6cf2ac8b3f86 (diff) | |
parent | ed92ece815e1f32259b3f0397476ff6ac92726e3 (diff) | |
download | rneovim-6ff13d78b7eb0a1fae2e2e8cdd054072e1467158.tar.gz rneovim-6ff13d78b7eb0a1fae2e2e8cdd054072e1467158.tar.bz2 rneovim-6ff13d78b7eb0a1fae2e2e8cdd054072e1467158.zip |
Merge #7720 'tui: rework deferred-termcodes implementation'
Diffstat (limited to 'src/nvim/os/pty_process_unix.c')
-rw-r--r-- | src/nvim/os/pty_process_unix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index 53301e4b53..855ca2ae47 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -72,8 +72,7 @@ int pty_process_spawn(PtyProcess *ptyproc) ELOG("forkpty failed: %s", strerror(errno)); return status; } else if (pid == 0) { - init_child(ptyproc); - abort(); + init_child(ptyproc); // never returns } // make sure the master file descriptor is non blocking @@ -163,14 +162,15 @@ static void init_child(PtyProcess *ptyproc) FUNC_ATTR_NONNULL_ALL Process *proc = (Process *)ptyproc; if (proc->cwd && os_chdir(proc->cwd) != 0) { - fprintf(stderr, "chdir failed: %s\n", strerror(errno)); + ELOG("chdir failed: %s", strerror(errno)); return; } char *prog = ptyproc->process.argv[0]; setenv("TERM", ptyproc->term_name ? ptyproc->term_name : "ansi", 1); execvp(prog, ptyproc->process.argv); - fprintf(stderr, "execvp failed: %s: %s\n", strerror(errno), prog); + ELOG("execvp failed: %s: %s", strerror(errno), prog); + _exit(122); // 122 is EXEC_FAILED in the Vim source. } static void init_termios(struct termios *termios) FUNC_ATTR_NONNULL_ALL |