version 1.93, 2015/11/18 14:27:44 |
version 1.94, 2015/11/24 23:46:15 |
|
|
void |
void |
server_fill_environ(struct session *s, struct environ *env) |
server_fill_environ(struct session *s, struct environ *env) |
{ |
{ |
char var[PATH_MAX], *term; |
char *term; |
u_int idx; |
u_int idx; |
long pid; |
long pid; |
|
|
if (s != NULL) { |
if (s != NULL) { |
term = options_get_string(global_options, "default-terminal"); |
term = options_get_string(global_options, "default-terminal"); |
environ_set(env, "TERM", term); |
environ_set(env, "TERM", "%s", term); |
|
|
idx = s->id; |
idx = s->id; |
} else |
} else |
idx = (u_int)-1; |
idx = (u_int)-1; |
pid = getpid(); |
pid = getpid(); |
xsnprintf(var, sizeof var, "%s,%ld,%u", socket_path, pid, idx); |
environ_set(env, "TMUX", "%s,%ld,%u", socket_path, pid, idx); |
environ_set(env, "TMUX", var); |
|
} |
} |
|
|
void |
void |