diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2019-02-24 20:09:14 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2019-02-27 23:29:07 +0100 |
commit | 89515304e4eb81ff9eb65f3a582136fc658de139 (patch) | |
tree | 24b445c4aa5588772aa98f830f4646a738727810 /src/nvim/os/pty_process_unix.c | |
parent | 1d8e7683604828592bd41cdac5a351145cd93487 (diff) | |
download | rneovim-89515304e4eb81ff9eb65f3a582136fc658de139.tar.gz rneovim-89515304e4eb81ff9eb65f3a582136fc658de139.tar.bz2 rneovim-89515304e4eb81ff9eb65f3a582136fc658de139.zip |
os/env: use libuv v1.12 getenv/setenv API
- Minimum required libuv is now v1.12
- Because `uv_os_getenv` requires allocating, we must manage a map
(`envmap` in `env.c`) to maintain the old behavior of `os_getenv` .
- free() map-items after removal. khash.h does not make copies of
anything, so even its keys must be memory-managed by the caller.
closes #8398
closes #9267
Diffstat (limited to 'src/nvim/os/pty_process_unix.c')
-rw-r--r-- | src/nvim/os/pty_process_unix.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/os/pty_process_unix.c b/src/nvim/os/pty_process_unix.c index bcf57e1b5b..9ff0399511 100644 --- a/src/nvim/os/pty_process_unix.c +++ b/src/nvim/os/pty_process_unix.c @@ -177,7 +177,7 @@ static void init_child(PtyProcess *ptyproc) } char *prog = ptyproc->process.argv[0]; - setenv("TERM", ptyproc->term_name ? ptyproc->term_name : "ansi", 1); + os_setenv("TERM", ptyproc->term_name ? ptyproc->term_name : "ansi", 1); execvp(prog, ptyproc->process.argv); ELOG("execvp failed: %s: %s", strerror(errno), prog); _exit(122); // 122 is EXEC_FAILED in the Vim source. |