From: Ian Jackson Date: Sun, 16 Feb 2020 14:47:24 +0000 (+0000) Subject: logging: Move "starting" message earlier X-Git-Tag: v0.6.1~27 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=commitdiff_plain;h=9eba4abfe44617aa78f625d900fe6bc2c58bb4cb 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 --- 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 */