mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
daemon: Disable logging to console after detaching.
When we detach, we replace stderr by /dev/null, so there's no point in logging to the console after that. Just turn it off.
This commit is contained in:
@@ -408,6 +408,9 @@ close_standard_fds(void)
|
||||
dup2(null_fd, STDOUT_FILENO);
|
||||
dup2(null_fd, STDERR_FILENO);
|
||||
}
|
||||
|
||||
/* Disable logging to stderr to avoid wasting CPU time. */
|
||||
vlog_set_levels(NULL, VLF_CONSOLE, VLL_EMER);
|
||||
}
|
||||
|
||||
/* If daemonization is configured, then starts daemonization, by forking and
|
||||
|
Reference in New Issue
Block a user