summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authornicm <nicm>2017-06-04 08:25:57 +0000
committernicm <nicm>2017-06-04 08:25:57 +0000
commitadf5628087829bed2eff635760d7cc456dd1e558 (patch)
treeceb0745ca673fb84658b4ba573ff6b3a04926b5f /server.c
parent184039044a92b83f38b880b0a4a1c5ebc272af9c (diff)
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.
Diffstat (limited to 'server.c')
-rw-r--r--server.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/server.c b/server.c
index e0987fca..4dc739d0 100644
--- a/server.c
+++ b/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;
}
}