diff options
author | Ben Pfaff <blp@ovn.org> | 2022-01-29 11:38:16 -0800 |
---|---|---|
committer | William Tu <u9012063@gmail.com> | 2022-02-14 00:40:02 -0800 |
commit | 78ff3961ca9fb012eaaca3d3af1e8186fe1827e7 (patch) | |
tree | 14142d1099561520704096b761caa1d6318c182d /include | |
parent | b9cf520705a91c3904b52489ec296316769b754e (diff) | |
download | openvswitch-78ff3961ca9fb012eaaca3d3af1e8186fe1827e7.tar.gz |
daemon-unix: Close log file in monitor process while waiting on child.
Until now, the monitor process held its log file open while it waited for
the child to exit, and then it reopened it after the child exited. Holding
the log file open this way prevented log rotation from freeing disk space.
This commit avoids the problem by closing the log file before waiting, then
reopening it afterward.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reported-by: Antonin Bas <abas@vmware.com>
VMware-BZ: #2743409
Signed-off-by: William Tu <u9012063@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/openvswitch/vlog.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/openvswitch/vlog.h b/include/openvswitch/vlog.h index 886fce5e0..e53ce6d81 100644 --- a/include/openvswitch/vlog.h +++ b/include/openvswitch/vlog.h @@ -131,7 +131,9 @@ void vlog_set_verbosity(const char *arg); /* Configuring log destinations. */ void vlog_set_pattern(enum vlog_destination, const char *pattern); +char *vlog_get_log_file(void); int vlog_set_log_file(const char *file_name); +void vlog_close_log_file(void); int vlog_reopen_log_file(void); #ifndef _WIN32 void vlog_change_owner_unix(uid_t, gid_t); |