summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sysklogd/syslogd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index 20034e9..7711e46 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -1055,6 +1055,14 @@ static int NOINLINE syslogd_init(char **argv)
G.hostname = safe_gethostname();
*strchrnul(G.hostname, '.') = '\0';
+ xmove_fd(create_socket(), STDIN_FILENO);
+
+ if (opts & OPT_circularlog)
+ ipcsyslog_init();
+
+ if (opts & OPT_kmsg)
+ kmsg_init();
+
if (!(opts & OPT_nofork)) {
bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv);
}
@@ -1068,14 +1076,6 @@ static int NOINLINE syslogd_init(char **argv)
signal(SIGALRM, do_mark);
alarm(G.markInterval);
#endif
- xmove_fd(create_socket(), STDIN_FILENO);
-
- if (opts & OPT_circularlog)
- ipcsyslog_init();
-
- if (opts & OPT_kmsg)
- kmsg_init();
-
return opts;
}