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:
18
server-fn.c
18
server-fn.c
@ -32,24 +32,6 @@ static struct session *server_next_session(struct session *);
|
||||
static void server_callback_identify(int, short, void *);
|
||||
static void server_destroy_session_group(struct session *);
|
||||
|
||||
void
|
||||
server_fill_environ(struct session *s, struct environ *env)
|
||||
{
|
||||
const char *term;
|
||||
u_int idx;
|
||||
long pid;
|
||||
|
||||
if (s != NULL) {
|
||||
term = options_get_string(global_options, "default-terminal");
|
||||
environ_set(env, "TERM", "%s", term);
|
||||
|
||||
idx = s->id;
|
||||
} else
|
||||
idx = (u_int)-1;
|
||||
pid = getpid();
|
||||
environ_set(env, "TMUX", "%s,%ld,%u", socket_path, pid, idx);
|
||||
}
|
||||
|
||||
void
|
||||
server_redraw_client(struct client *c)
|
||||
{
|
||||
|
Reference in New Issue
Block a user