From 21b77ec46c29dfca393f3d33a84470baa8c70784 Mon Sep 17 00:00:00 2001 From: Keith Amidon Date: Tue, 13 Jan 2009 15:30:40 -0800 Subject: [PATCH] Reopen log file in addition to reading conf file when vswitchd receives sighup This only reopens the vswitchd log file. The child secchan processes for each bridge are not requested to do the same thing. Since secchan in general logs very little data, rotating those files isn't being done right now, so this is probably okay. At some point we should probably correct it however. --- vswitchd/vswitchd.8.in | 3 ++- vswitchd/vswitchd.c | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vswitchd/vswitchd.8.in b/vswitchd/vswitchd.8.in index ec7ac1be..9a157192 100644 --- a/vswitchd/vswitchd.8.in +++ b/vswitchd/vswitchd.8.in @@ -17,7 +17,8 @@ virtual switches on the local machine. At startup or upon receipt of a \fBSIGHUP\fR signal, \fBvswitchd\fR reads the configuration files or directories specified on the command line. It sets up OpenFlow datapaths and then operates switching -across each bridge described in its configuration files. +across each bridge described in its configuration files. If a logfile +was specified on the command line it will also be opened or reopened. .PP \fBvswitchd\fR virtual switches may be configured with any of the following features: diff --git a/vswitchd/vswitchd.c b/vswitchd/vswitchd.c index dc1cfa1d..5077415d 100644 --- a/vswitchd/vswitchd.c +++ b/vswitchd/vswitchd.c @@ -89,6 +89,7 @@ main(int argc, char *argv[]) for (;;) { if (signal_poll(sighup)) { + vlog_reopen_log_file(); reconfigure(); } bridge_run(); -- 2.30.2