mirror of
https://github.com/tmux/tmux.git
synced 2025-09-01 20:57:00 +00:00
Support SIGUSR2 to stop and start logging for an existing server. Also
we currently only have two log levels so just use -v and -vv rather than -v and -vvvv, and clarify the man page entry for -v.
This commit is contained in:
5
server.c
5
server.c
@ -151,7 +151,7 @@ server_start(struct event_base *base, int lockfd, char *lockfile)
|
||||
}
|
||||
close(pair[0]);
|
||||
|
||||
if (log_get_level() > 3)
|
||||
if (log_get_level() > 1)
|
||||
tty_create_log();
|
||||
if (pledge("stdio rpath wpath cpath fattr unix getpw recvfd proc exec "
|
||||
"tty ps", NULL) != 0)
|
||||
@ -365,6 +365,9 @@ server_signal(int sig)
|
||||
}
|
||||
server_add_accept(0);
|
||||
break;
|
||||
case SIGUSR2:
|
||||
proc_toggle_log(server_proc);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user