diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-11-25 16:37:30 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-11-25 16:37:30 +0000 |
commit | 890d8da2e3588d416ef178e2e74ed3df226a6040 (patch) | |
tree | 3d024b90830e8afe48f75f0cb741965a5bb76015 /server-fn.c | |
parent | 0a2ef2b932f37d54157d82e526a8097caf9143ba (diff) | |
parent | ac8678aefe157d7e40c5bcedd12333eaedf0df92 (diff) |
Merge branch 'obsd-master'
Conflicts:
log.c
proc.c
tmux.c
Diffstat (limited to 'server-fn.c')
-rw-r--r-- | server-fn.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/server-fn.c b/server-fn.c index 56c98462..1e1198dd 100644 --- a/server-fn.c +++ b/server-fn.c @@ -32,20 +32,19 @@ void server_callback_identify(int, short, void *); void server_fill_environ(struct session *s, struct environ *env) { - char var[PATH_MAX], *term; - u_int idx; - long pid; + char *term; + u_int idx; + long pid; if (s != NULL) { term = options_get_string(global_options, "default-terminal"); - environ_set(env, "TERM", term); + environ_set(env, "TERM", "%s", term); idx = s->id; } else idx = (u_int)-1; pid = getpid(); - xsnprintf(var, sizeof var, "%s,%ld,%u", socket_path, pid, idx); - environ_set(env, "TMUX", var); + environ_set(env, "TMUX", "%s,%ld,%u", socket_path, pid, idx); } void |