mirror of
https://github.com/ShaYmez/P25Clients.git
synced 2024-11-22 04:11:39 -05:00
Close the fds after log initialisation.
This commit is contained in:
parent
aba8d436ea
commit
12c9336374
@ -119,10 +119,6 @@ void CP25Gateway::run()
|
||||
return;
|
||||
}
|
||||
|
||||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
|
||||
// If we are currently root...
|
||||
if (getuid() == 0) {
|
||||
struct passwd* user = ::getpwnam("mmdvm");
|
||||
@ -160,6 +156,14 @@ void CP25Gateway::run()
|
||||
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());
|
||||
unsigned int rptPort = m_conf.getRptPort();
|
||||
|
||||
|
@ -119,10 +119,6 @@ void CP25Reflector::run()
|
||||
return;
|
||||
}
|
||||
|
||||
::close(STDIN_FILENO);
|
||||
::close(STDOUT_FILENO);
|
||||
::close(STDERR_FILENO);
|
||||
|
||||
// If we are currently root...
|
||||
if (getuid() == 0) {
|
||||
struct passwd* user = ::getpwnam("mmdvm");
|
||||
@ -160,6 +156,14 @@ void CP25Reflector::run()
|
||||
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());
|
||||
|
||||
ret = network.open();
|
||||
|
Loading…
Reference in New Issue
Block a user