Browse Source

Log when sd_listen_fds() fails

pull/1722/head
Pierre Ossman 3 months ago
parent
commit
52f4388110
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      unix/x0vncserver/x0vncserver.cxx

+ 5
- 0
unix/x0vncserver/x0vncserver.cxx View File

@@ -120,6 +120,11 @@ static void CleanupSignalHandler(int /*sig*/)
static int createSystemdListeners(std::list<SocketListener*> *listeners)
{
int count = sd_listen_fds(0);
if (count < 0) {
vlog.error("Error getting listening sockets from systemd: %s",
strerror(-count));
return count;
}

for (int i = 0; i < count; ++i)
listeners->push_back(new TcpListener(SD_LISTEN_FDS_START + i));

Loading…
Cancel
Save