1
0
Fork 0

Merge remote-tracking branch 'g4klx/master'

ycs232-kbc
Andy CA6JAU 6 years ago
commit 1c91d981f4

@ -133,10 +133,6 @@ int CYSFGateway::run()
return -1; return -1;
} }
::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");
@ -174,6 +170,14 @@ int CYSFGateway::run()
return 1; return 1;
} }
#if !defined(_WIN32) && !defined(_WIN64)
if (m_daemon) {
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
::close(STDERR_FILENO);
}
#endif
m_callsign = m_conf.getCallsign(); m_callsign = m_conf.getCallsign();
m_suffix = m_conf.getSuffix(); m_suffix = m_conf.getSuffix();

@ -117,10 +117,6 @@ void CYSFReflector::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");
@ -158,6 +154,14 @@ void CYSFReflector::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.getName(), m_conf.getDescription(), m_conf.getNetworkDebug()); CNetwork network(m_conf.getNetworkPort(), m_conf.getName(), m_conf.getDescription(), m_conf.getNetworkDebug());
ret = network.open(); ret = network.open();

Loading…
Cancel
Save