X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=lib%2Fdaemon.c;h=ef1a24ef1e350a0a65e8a93052d468cae1bced1e;hb=0c58c0c4da31b554e88be581cca39d314ded9b6b;hp=aa971f2a8f8bd3822aad05940125fdec4e199686;hpb=aacea8ba432bdffcca77696ba407be0c62661394;p=openvswitch diff --git a/lib/daemon.c b/lib/daemon.c index aa971f2a..ef1a24ef 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -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_OFF); } /* If daemonization is configured, then starts daemonization, by forking and @@ -554,7 +557,7 @@ read_pidfile__(const char *pidfile, bool delete_if_stale) * pidfile locked, and only that process has the right to unlink it. */ if (!delete_if_stale) { error = ESRCH; - VLOG_WARN("%s: pid file is stale", pidfile); + VLOG_DBG("%s: pid file is stale", pidfile); goto error; }