mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Move server_fill_environ into environ.c and move some other common code
into it.
This commit is contained in:
7
job.c
7
job.c
@ -53,12 +53,7 @@ job_run(const char *cmd, struct session *s, const char *cwd,
|
||||
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, out) != 0)
|
||||
return (NULL);
|
||||
|
||||
env = environ_create();
|
||||
environ_copy(global_environ, env);
|
||||
if (s != NULL)
|
||||
environ_copy(s->environ, env);
|
||||
server_fill_environ(s, env);
|
||||
|
||||
env = environ_for_session(s);
|
||||
switch (pid = fork()) {
|
||||
case -1:
|
||||
environ_free(env);
|
||||
|
Reference in New Issue
Block a user