diff options
Diffstat (limited to 'src/zenserver/main.cpp')
| -rw-r--r-- | src/zenserver/main.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/zenserver/main.cpp b/src/zenserver/main.cpp index 93516f5fd..25a5d5cf5 100644 --- a/src/zenserver/main.cpp +++ b/src/zenserver/main.cpp @@ -109,12 +109,27 @@ ZenEntryPoint::Run() { if (m_ServerOptions.OwnerPid) { - if (!IsProcessRunning(m_ServerOptions.OwnerPid)) + std::error_code Ec; + if (!IsProcessRunning(m_ServerOptions.OwnerPid, Ec)) { - ZEN_WARN("Sponsor owner pid {} is no longer running, will not add sponsor to process listening to port {} (pid: {})", - m_ServerOptions.OwnerPid, - m_ServerOptions.BasePort, - Entry->Pid.load()); + if (Ec) + { + ZEN_WARN( + "Sponsor owner pid {} can not be checked for running state, reason: '{}'. Will not add sponsor to process " + "listening to port {} (pid: {})", + m_ServerOptions.OwnerPid, + Ec.message(), + m_ServerOptions.BasePort, + Entry->Pid.load()); + } + else + { + ZEN_WARN( + "Sponsor owner pid {} is no longer running, will not add sponsor to process listening to port {} (pid: {})", + m_ServerOptions.OwnerPid, + m_ServerOptions.BasePort, + Entry->Pid.load()); + } std::exit(1); } ZEN_INFO( |