civodul pushed a commit to branch wip-syslogd
in repository shepherd.
commit 08f5a176caa48740e3a083988b1c2e31a5547598
Author: Ludovic Courtès <[email protected]>
AuthorDate: Tue Jul 30 18:58:09 2024 +0200
endpoints: Call ‘listen’ only for stream sockets.
* modules/shepherd/endpoints.scm (endpoint->listening-socket): Call
‘listen’ only when STYLE is SOCK_STREAM.
---
modules/shepherd/endpoints.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/shepherd/endpoints.scm b/modules/shepherd/endpoints.scm
index 65e53d5..50af214 100644
--- a/modules/shepherd/endpoints.scm
+++ b/modules/shepherd/endpoints.scm
@@ -153,7 +153,8 @@ retrying to bind it in one second.")
(bind/retry-if-in-use sock address
#:max-attempts bind-attempts)
- (listen sock backlog)
+ (when (= SOCK_STREAM style)
+ (listen sock backlog))
(when (= AF_UNIX (sockaddr:fam address))
(chown (sockaddr:path address) owner group)