civodul pushed a commit to branch devel
in repository shepherd.

commit 8477dc9c26f0598e50a398fd77821b643411f62c
Author: Ludovic Courtès <l...@gnu.org>
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)

Reply via email to