civodul pushed a commit to branch master
in repository shepherd.
commit 245f884e22656ef6907082bcc24cc9968b5dee44
Author: Ludovic Courtès <[email protected]>
AuthorDate: Sun Aug 28 17:32:43 2022 +0200
comm: Mark the syslog socket as SOCK_CLOEXEC.
* modules/shepherd/comm.scm (call-with-syslog-port): Add 'SOCK_CLOEXEC'
to the second argument to 'socket'.
---
modules/shepherd/comm.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/modules/shepherd/comm.scm b/modules/shepherd/comm.scm
index b90b893..a993439 100644
--- a/modules/shepherd/comm.scm
+++ b/modules/shepherd/comm.scm
@@ -1,5 +1,5 @@
;; comm.scm -- Communication between processes and general output.
-;; Copyright (C) 2013, 2014, 2016, 2018, 2019 Ludovic Courtès <[email protected]>
+;; Copyright (C) 2013, 2014, 2016, 2018, 2019, 2022 Ludovic Courtès
<[email protected]>
;; Copyright (C) 2002, 2003 Wolfgang Jährling <[email protected]>
;; Copyright (C) 2018 Danny Milosavljevic <[email protected]>
;;
@@ -238,7 +238,9 @@ mechanism."
(apply throw args)))))
(or (and port (not (port-closed? port)) (call/syslog))
- (let ((sock (socket AF_UNIX SOCK_DGRAM 0)))
+ (let ((sock (socket AF_UNIX
+ (logior SOCK_CLOEXEC SOCK_DGRAM)
+ 0)))
(catch 'system-error
(lambda ()
(connect sock AF_UNIX "/dev/log")