mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
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
This commit is contained in:
@@ -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.
|
||||
|
Reference in New Issue
Block a user