Fix #9: Open kernel log pipe after daemonizing
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
3462e2ba19
commit
e15d789c84
@ -372,12 +372,6 @@ int main(int argc, char *argv[])
|
|||||||
.pe_mode = 0666,
|
.pe_mode = 0666,
|
||||||
});
|
});
|
||||||
|
|
||||||
/* Attempt to open kernel log pipe */
|
|
||||||
if (opensys(_PATH_KLOG))
|
|
||||||
warn("Kernel logging disabled, failed opening %s", _PATH_KLOG);
|
|
||||||
else
|
|
||||||
kern_console_off();
|
|
||||||
|
|
||||||
if (!Foreground && !Debug) {
|
if (!Foreground && !Debug) {
|
||||||
ppid = waitdaemon(30);
|
ppid = waitdaemon(30);
|
||||||
if (ppid < 0)
|
if (ppid < 0)
|
||||||
@ -387,6 +381,12 @@ int main(int argc, char *argv[])
|
|||||||
setlinebuf(stdout);
|
setlinebuf(stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Attempt to open kernel log pipe */
|
||||||
|
if (opensys(_PATH_KLOG))
|
||||||
|
warn("Kernel logging disabled, failed opening %s", _PATH_KLOG);
|
||||||
|
else
|
||||||
|
kern_console_off();
|
||||||
|
|
||||||
consfile.f_type = F_CONSOLE;
|
consfile.f_type = F_CONSOLE;
|
||||||
strlcpy(consfile.f_un.f_fname, ctty, sizeof(consfile.f_un.f_fname));
|
strlcpy(consfile.f_un.f_fname, ctty, sizeof(consfile.f_un.f_fname));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user