inetd: open log after daemonization
This commit is contained in:
parent
7a431b3715
commit
ffcef2d1f7
@ -1272,8 +1272,6 @@ inetd_main(int argc, char *argv[])
|
|||||||
LastArg = envp[-1] + strlen(envp[-1]);
|
LastArg = envp[-1] + strlen(envp[-1]);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
openlog(applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
|
|
||||||
|
|
||||||
opt = getopt32(argc, argv, "R:f", &stoomany);
|
opt = getopt32(argc, argv, "R:f", &stoomany);
|
||||||
if(opt & 1) {
|
if(opt & 1) {
|
||||||
toomany = xatoi_u(stoomany);
|
toomany = xatoi_u(stoomany);
|
||||||
@ -1298,6 +1296,7 @@ inetd_main(int argc, char *argv[])
|
|||||||
#else
|
#else
|
||||||
bb_sanitize_stdio(!(opt & 2));
|
bb_sanitize_stdio(!(opt & 2));
|
||||||
#endif
|
#endif
|
||||||
|
openlog(applet_name, LOG_PID | LOG_NOWAIT, LOG_DAEMON);
|
||||||
logmode = LOGMODE_SYSLOG;
|
logmode = LOGMODE_SYSLOG;
|
||||||
|
|
||||||
if (uid == 0) {
|
if (uid == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user