diff options
author | nicm <nicm> | 2017-03-09 17:02:38 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-03-09 17:02:38 +0000 |
commit | dbfee6a468172899759a86c7bf50169053adce45 (patch) | |
tree | 6db1e79cc83501839bb96436a430cce03c1ea730 /session.c | |
parent | e8f2609ca445b09b04cb131059e5b71c3a40f451 (diff) | |
download | rtmux-dbfee6a468172899759a86c7bf50169053adce45.tar.gz rtmux-dbfee6a468172899759a86c7bf50169053adce45.tar.bz2 rtmux-dbfee6a468172899759a86c7bf50169053adce45.zip |
Move server_fill_environ into environ.c and move some other common code
into it.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -355,16 +355,12 @@ session_new(struct session *s, const char *name, int argc, char **argv, } wl->session = s; - env = environ_create(); - environ_copy(global_environ, env); - environ_copy(s->environ, env); - server_fill_environ(s, env); - shell = options_get_string(s->options, "default-shell"); if (*shell == '\0' || areshell(shell)) shell = _PATH_BSHELL; hlimit = options_get_number(s->options, "history-limit"); + env = environ_for_session(s); w = window_create_spawn(name, argc, argv, path, shell, cwd, env, s->tio, s->sx, s->sy, hlimit, cause); if (w == NULL) { @@ -373,8 +369,8 @@ session_new(struct session *s, const char *name, int argc, char **argv, return (NULL); } winlink_set_window(wl, w); - notify_session_window("window-linked", s, w); environ_free(env); + notify_session_window("window-linked", s, w); session_group_synchronize_from(s); return (wl); |