[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 03/03: comm: Mark the syslog socket as SOCK_CLOEXEC.
From: |
Ludovic Courtès |
Subject: |
[shepherd] 03/03: comm: Mark the syslog socket as SOCK_CLOEXEC. |
Date: |
Sun, 28 Aug 2022 11:33:57 -0400 (EDT) |
civodul pushed a commit to branch master
in repository shepherd.
commit 245f884e22656ef6907082bcc24cc9968b5dee44
Author: Ludovic Courtès <ludo@gnu.org>
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 <ludo@gnu.org>
+;; Copyright (C) 2013, 2014, 2016, 2018, 2019, 2022 Ludovic Courtès
<ludo@gnu.org>
;; Copyright (C) 2002, 2003 Wolfgang Jährling <wolfgang@pro-linux.de>
;; Copyright (C) 2018 Danny Milosavljevic <dannym@scratchpost.org>
;;
@@ -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")