From: Aleš Mrázek Date: Thu, 25 Sep 2025 15:16:42 +0000 (+0200) Subject: daemon/main.c: notify_ready: do not fail if NOTIFY_SOCKET is not configured X-Git-Tag: v6.0.16~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fenvironments%2Fdocs-policy-loade-4z1auj%2Fdeployments%2F7768;p=thirdparty%2Fknot-resolver.git daemon/main.c: notify_ready: do not fail if NOTIFY_SOCKET is not configured --- diff --git a/daemon/main.c b/daemon/main.c index 3925a15c1..b1d76cfd1 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -394,9 +394,14 @@ static int notify_ready(const char *state) int sockfd; struct sockaddr_un addr; char *socket_path = getenv("NOTIFY_SOCKET"); + /* If the supervisor does not set $NOTIFY_SOCKET, + * it means that it does not expect a READY notification. */ if (!socket_path) { - kr_log_error(WORKER, "Failed retrieving env variable $NOTIFY_SOCKET\n"); - return EXIT_FAILURE; + kr_log_debug(WORKER, + "skipped the READY notification, " + "$NOTIFY_SOCKET env variable is not configured\n" + ); + return kr_ok(); } if ((sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) == -1) { kr_log_error(WORKER, "Failed to create unix socket at $NOTIFY_SOCKET ('%s'): %s\n",