mirror of https://github.com/g4klx/DMRGateway
Close the fds as the log initialisation.
This commit is contained in:
parent
b92c08ecaf
commit
6e65ce5e18
|
|
@ -238,10 +238,6 @@ int CDMRGateway::run()
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
::close(STDIN_FILENO);
|
|
||||||
::close(STDOUT_FILENO);
|
|
||||||
::close(STDERR_FILENO);
|
|
||||||
|
|
||||||
// If we are currently root...
|
// If we are currently root...
|
||||||
if (getuid() == 0) {
|
if (getuid() == 0) {
|
||||||
struct passwd* user = ::getpwnam("mmdvm");
|
struct passwd* user = ::getpwnam("mmdvm");
|
||||||
|
|
@ -279,6 +275,14 @@ int CDMRGateway::run()
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_WIN32) && !defined(_WIN64)
|
||||||
|
if (m_daemon) {
|
||||||
|
::close(STDIN_FILENO);
|
||||||
|
::close(STDOUT_FILENO);
|
||||||
|
::close(STDERR_FILENO);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
LogInfo(HEADER1);
|
LogInfo(HEADER1);
|
||||||
LogInfo(HEADER2);
|
LogInfo(HEADER2);
|
||||||
LogInfo(HEADER3);
|
LogInfo(HEADER3);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue