[PATCH 1/4] main: connect instead of binding to systemd notify socket

Martin Hundebøll <[email protected]> Fri, 10 Oct 2025 11:20:02 +0200
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
Binding is for the server (i.e. systemd), while connecting is for the
client (i.e. ell).
---
 ell/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ell/main.c b/ell/main.c
index 1d591810e836..5e391b7e62b3 100644
--- a/ell/main.c
+++ b/ell/main.c
@@ -374,7 +374,7 @@ static void create_sd_notify_socket(void)
 	if (addr.sun_path[0] == '@')
 		addr.sun_path[0] = '\0';
 
-	if (bind(notify_fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
+	if (connect(notify_fd, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
 		close(notify_fd);
 		notify_fd = 0;
 		return;
-- 
2.51.0