aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-01-14 02:03:28 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-01-14 02:03:28 +0000
commitffcef2d1f71a1707b94e235e63495178144de861 (patch)
tree0c6e9369962b15be9a7b457c0964065ce24a58ec
parent7a431b3715299854fb423ec00d5fafc0e2c7f07b (diff)
downloadbusybox-ffcef2d1f71a1707b94e235e63495178144de861.tar.gz
inetd: open log after daemonization
-rw-r--r--networking/inetd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/inetd.c b/networking/inetd.c
index f9f3b51b6..fd2c88a6b 100644
--- a/networking/inetd.c
+++ b/networking/inetd.c
@@ -1272,8 +1272,6 @@ inetd_main(int argc, char *argv[])
LastArg = envp[-1] + strlen(envp[-1]);
#endif
- openlog(applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
-
opt = getopt32(argc, argv, "R:f", &stoomany);
if(opt & 1) {
toomany = xatoi_u(stoomany);
@@ -1298,6 +1296,7 @@ inetd_main(int argc, char *argv[])
#else
bb_sanitize_stdio(!(opt & 2));
#endif
+ openlog(applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;
if (uid == 0) {