guix-commits
[Top][All Lists]
Advanced

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

[shepherd] 06/10: service: Mark service logging pipe as O_CLOEXEC.


From: Ludovic Courtès
Subject: [shepherd] 06/10: service: Mark service logging pipe as O_CLOEXEC.
Date: Wed, 7 Sep 2022 17:19:10 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit 24b0c1f521a33455b4975e1af52079e9303f0eb9
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Sep 7 15:32:14 2022 +0200

    service: Mark service logging pipe as O_CLOEXEC.
    
    * modules/shepherd/service.scm (fork+exec-command): Use 'pipe2'.
---
 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 c106966..7b36a1d 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1098,7 +1098,7 @@ environment variable used for systemd-style \"socket 
activation\"."
   ;; handler, which stops shepherd, is called.  To avoid this, block signals
   ;; so that the child process never executes those handlers.
   (with-blocked-signals %precious-signals
-    (match (pipe)
+    (match (pipe2 O_CLOEXEC)
       ((log-input . log-output)
        (let ((pid (primitive-fork)))
          (if (zero? pid)



reply via email to

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