commit:     bb9c481f02cb1843e00bf32e98caf18b6b56bb4d
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Oct 26 18:36:41 2017 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Thu Oct 26 18:36:41 2017 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=bb9c481f

supervise-daemon: log with the service name instead of "supervise-daemon"

 src/rc/supervise-daemon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/rc/supervise-daemon.c b/src/rc/supervise-daemon.c
index b232e215..6c3c55bf 100644
--- a/src/rc/supervise-daemon.c
+++ b/src/rc/supervise-daemon.c
@@ -420,7 +420,6 @@ static void supervisor(char *exec, char **argv)
        time_t respawn_now= 0;
        time_t first_spawn= 0;
 
-       openlog(applet, LOG_PID, LOG_DAEMON);
 #ifndef RC_DEBUG
        signal_setup_restart(SIGHUP, handle_signal);
        signal_setup_restart(SIGINT, handle_signal);
@@ -561,6 +560,7 @@ int main(int argc, char **argv)
        applet = basename_c(argv[0]);
        atexit(cleanup);
        svcname = getenv("RC_SVCNAME");
+       openlog(svcname, LOG_PID, LOG_DAEMON);
 
        if ((tmp = getenv("SSD_NICELEVEL")))
                if (sscanf(tmp, "%d", &nicelevel) != 1)

Reply via email to