From 9eba4abfe44617aa78f625d900fe6bc2c58bb4cb Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 16 Feb 2020 14:47:24 +0000 Subject: [PATCH] logging: Move "starting" message earlier We are going to add some log messages to PHASE_RUN hooks. We want the overall startup message to come first. Doing this right after PHASE_DAEMONIZE makes sense as PHASE_DAEMONIZE now sets up logging, too. Signed-off-by: Ian Jackson --- secnet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/secnet.c b/secnet.c index a00124f..2ebcddc 100644 --- a/secnet.c +++ b/secnet.c @@ -329,8 +329,6 @@ static void run(void) struct pollfd *fds=0; int allocdfds=0, shortfall=0; - Message(M_NOTICE,"%s [%d]: starting\n",version,secnet_pid); - do { if (gettimeofday(&tv_now_global, NULL)!=0) { fatal_perror("main loop: gettimeofday"); @@ -517,6 +515,7 @@ int main(int argc, char **argv) enter_phase(PHASE_DAEMONIZE); become_daemon(); + Message(M_NOTICE,"%s [%d]: starting\n",version,secnet_pid); enter_phase(PHASE_GETRESOURCES); /* Appropriate phase hooks will have been run */ -- 2.30.2