guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 08/10: service: Mark inetd connection sockets as SOCK_CLOEXEC


From: Ludovic Courtès
Subject: [shepherd] 08/10: service: Mark inetd connection sockets as SOCK_CLOEXEC.
Date: Wed, 7 Sep 2022 17:19:11 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit ac7e2e5e1619adf44b85b4b94514cdae47c5499c
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 7 22:22:20 2022 +0200

    service: Mark inetd connection sockets as SOCK_CLOEXEC.
    
    * modules/shepherd/service.scm (make-inetd-constructor): Pass
    SOCK_CLOEXEC to 'accept'.
---
 modules/shepherd/service.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 5b0ef6c..f45bbf5 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1519,7 +1519,7 @@ The remaining arguments are as for 
@code{make-forkexec-constructor}."
     ;; Return a thunk that accepts client connections from SOCK.
     (lambda ()
       (let loop ()
-        (match (accept sock)
+        (match (accept sock SOCK_CLOEXEC)
           ((connection . client-address)
            (if (>= connection-count max-connections)
                (begin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]