From: Jonathan McDowell Date: Fri, 15 Sep 2023 05:58:38 +0000 (+0530) Subject: Indicate when we've been started via socket activation X-Git-Tag: onak-0.6.3~11 X-Git-Url: https://the.earth.li/gitweb/?a=commitdiff_plain;h=529a576854aacb2d829f70dc940a4fd8b706b0f5;p=onak.git Indicate when we've been started via socket activation Update the starting log message for keyd so it's clear when we've been started up via systemd socket activation, which would have helped avoid the long standing bug with building properly with systemd support. --- diff --git a/keydb/keyd.c b/keydb/keyd.c index 2628b74..5b18785 100644 --- a/keydb/keyd.c +++ b/keydb/keyd.c @@ -52,9 +52,7 @@ /* Maximum number of clients we're prepared to accept at once */ #define MAX_CLIENTS 16 -#ifdef HAVE_SYSTEMD static bool using_socket_activation = false; -#endif static struct keyd_stats *stats; @@ -682,7 +680,8 @@ int main(int argc, char *argv[]) dbctx = config.dbinit(config.backend, false); - logthing(LOGTHING_NOTICE, "Accepting connections."); + logthing(LOGTHING_NOTICE, "Accepting connections%s", + using_socket_activation ? " (via systemd)" : ""); while (!cleanup() && select(maxfd + 1, &rfds, NULL, NULL, NULL) != -1) { /* * Deal with existing clients first; if we're at our