mirror of
https://github.com/ShaYmez/NXDNClients.git
synced 2026-06-08 09:04:47 -04:00
Close the fds after log initialisation.
This commit is contained in:
@@ -120,10 +120,6 @@ void CNXDNReflector::run()
|
||||
return;
|
||||
}
|
||||
|
||||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
|
||||
// If we are currently root...
|
||||
if (getuid() == 0) {
|
||||
struct passwd* user = ::getpwnam("mmdvm");
|
||||
@@ -161,6 +157,14 @@ void CNXDNReflector::run()
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined(_WIN32) && !defined(_WIN64)
|
||||
if (m_daemon) {
|
||||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
}
|
||||
#endif
|
||||
|
||||
unsigned short tg = m_conf.getTG();
|
||||
|
||||
CNXDNNetwork nxdnNetwork(m_conf.getNetworkPort(), m_conf.getNetworkDebug());
|
||||
|
||||
Reference in New Issue
Block a user