Fix stderr messages at startup in DMR2NXDN, NXDN2DMR, YSF2NXDN and YSF2P25

This commit is contained in:
Andy CA6JAU 2018-07-22 20:35:15 -04:00
parent fb26e4e344
commit a50c3be186
4 changed files with 12 additions and 4 deletions

View File

@ -157,7 +157,6 @@ int CDMR2NXDN::run()
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
::close(STDERR_FILENO);
// If we are currently root...
if (getuid() == 0) {
@ -196,6 +195,9 @@ int CDMR2NXDN::run()
return 1;
}
if (m_daemon)
::close(STDERR_FILENO);
m_defsrcid = m_conf.getDMRId();
std::string gatewayAddress = m_conf.getDstAddress();

View File

@ -161,7 +161,6 @@ int CNXDN2DMR::run()
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
::close(STDERR_FILENO);
// If we are currently root...
if (getuid() == 0) {
@ -200,6 +199,9 @@ int CNXDN2DMR::run()
return 1;
}
if (m_daemon)
::close(STDERR_FILENO);
m_callsign = m_conf.getCallsign();
m_nxdnTG = m_conf.getTG();

View File

@ -159,7 +159,6 @@ int CYSF2NXDN::run()
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
::close(STDERR_FILENO);
//If we are currently root...
if (getuid() == 0) {
@ -198,6 +197,9 @@ int CYSF2NXDN::run()
return 1;
}
if (m_daemon)
::close(STDERR_FILENO);
m_callsign = m_conf.getCallsign();
m_suffix = m_conf.getSuffix();
m_defsrcid = m_conf.getNXDNId();

View File

@ -211,7 +211,6 @@ int CYSF2P25::run()
::close(STDIN_FILENO);
::close(STDOUT_FILENO);
::close(STDERR_FILENO);
// If we are currently root...
if (getuid() == 0) {
@ -250,6 +249,9 @@ int CYSF2P25::run()
return 1;
}
if (m_daemon)
::close(STDERR_FILENO);
m_callsign = m_conf.getCallsign();
m_defsrcid = m_conf.getP25Id();
m_dstid = m_conf.getP25DstId();