mirror of
https://github.com/ShaYmez/P25Clients.git
synced 2025-09-05 14:47:51 -04:00
Close the fds after log initialisation.
This commit is contained in:
parent
aba8d436ea
commit
12c9336374
@ -119,10 +119,6 @@ void CP25Gateway::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");
|
||||||
@ -160,6 +156,14 @@ void CP25Gateway::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();
|
||||||
|
|
||||||
|
@ -119,10 +119,6 @@ void CP25Reflector::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");
|
||||||
@ -160,6 +156,14 @@ void CP25Reflector::run()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(_WIN32) && !defined(_WIN64)
|
||||||
|
if (m_daemon) {
|
||||||
|
::close(STDIN_FILENO);
|
||||||
|
::close(STDOUT_FILENO);
|
||||||
|
::close(STDERR_FILENO);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
CNetwork network(m_conf.getNetworkPort(), m_conf.getNetworkDebug());
|
CNetwork network(m_conf.getNetworkPort(), m_conf.getNetworkDebug());
|
||||||
|
|
||||||
ret = network.open();
|
ret = network.open();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user