mirror of
https://github.com/ShaYmez/NXDNClients.git
synced 2024-11-22 23:38:37 -05:00
Close the fds after log initialisation.
This commit is contained in:
parent
0bf5ee565c
commit
e281095a79
@ -127,10 +127,6 @@ void CNXDNGateway::run()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
::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");
|
||||||
@ -168,6 +164,14 @@ void CNXDNGateway::run()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_WIN32) && !defined(_WIN64)
|
||||||
|
if (m_daemon) {
|
||||||
|
::close(STDIN_FILENO);
|
||||||
|
::close(STDOUT_FILENO);
|
||||||
|
::close(STDERR_FILENO);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
in_addr rptAddr = CUDPSocket::lookup(m_conf.getRptAddress());
|
in_addr rptAddr = CUDPSocket::lookup(m_conf.getRptAddress());
|
||||||
unsigned int rptPort = m_conf.getRptPort();
|
unsigned int rptPort = m_conf.getRptPort();
|
||||||
|
|
||||||
|
@ -120,10 +120,6 @@ void CNXDNReflector::run()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
::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");
|
||||||
@ -161,6 +157,14 @@ void CNXDNReflector::run()
|
|||||||
return;
|
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();
|
unsigned short tg = m_conf.getTG();
|
||||||
|
|
||||||
CNXDNNetwork nxdnNetwork(m_conf.getNetworkPort(), m_conf.getNetworkDebug());
|
CNXDNNetwork nxdnNetwork(m_conf.getNetworkPort(), m_conf.getNetworkDebug());
|
||||||
|
Loading…
Reference in New Issue
Block a user