mirror of
https://github.com/g4klx/DMRGateway.git
synced 2026-01-28 02:54:22 +01:00
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;
|
||||
}
|
||||
|
||||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
|
||||
// If we are currently root...
|
||||
if (getuid() == 0) {
|
||||
struct passwd* user = ::getpwnam("mmdvm");
|
||||
|
|
@ -279,6 +275,14 @@ int CDMRGateway::run()
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
if (m_daemon) {
|
||||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
}
|
||||
#endif
|
||||
|
||||
LogInfo(HEADER1);
|
||||
LogInfo(HEADER2);
|
||||
LogInfo(HEADER3);
|
||||
|
|
|
|||
Loading…
Reference in a new issue