diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-03-09 17:02:39 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2017-03-09 17:02:39 +0000 |
commit | d5cffd6633270052181503e5a2e5b9a10bde251e (patch) | |
tree | bd7078d4d59758517ea0a0020fcbaa848244bd47 /usr.bin/tmux/job.c | |
parent | 802e114586ecfa21a8e416ab735849b32b6beeeb (diff) |
Move server_fill_environ into environ.c and move some other common code
into it.
Diffstat (limited to 'usr.bin/tmux/job.c')
-rw-r--r-- | usr.bin/tmux/job.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/usr.bin/tmux/job.c b/usr.bin/tmux/job.c index 7f037b295cc..9f50311c40d 100644 --- a/usr.bin/tmux/job.c +++ b/usr.bin/tmux/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.41 2016/10/10 21:29:23 nicm Exp $ */ +/* $OpenBSD: job.c,v 1.42 2017/03/09 17:02:38 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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); |