From 043b2f2b4d7115e5d5c245814c86a6d483520ada Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20Mr=C3=A1zek?= Date: Thu, 25 Sep 2025 17:16:42 +0200 Subject: [PATCH] daemon/main.c: notify_ready: do not fail if NOTIFY_SOCKET is not configured --- daemon/main.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/daemon/main.c b/daemon/main.c index 3925a15c1..79d5fc913 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 he 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", -- 2.47.3