GNU bug report logs -
#27323
[PATCH shepherd] Make sure that shepherd does not serve already-served sockets.
Previous Next
Full log
Message #11 received at 27323 <at> debbugs.gnu.org (full text, mbox):
---
modules/shepherd/support.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/shepherd/support.scm b/modules/shepherd/support.scm
index e50de74..ea98b5f 100644
--- a/modules/shepherd/support.scm
+++ b/modules/shepherd/support.scm
@@ -251,6 +251,11 @@ There is NO WARRANTY, to the extent permitted by law.")))
(string-append user-homedir "/.config"))
"/shepherd"))
+(define %user-runtime-dir
+ ;; Default runtime directory if shepherd is run as a normal user.
+ (string-append (or (getenv "XDG_RUNTIME_DIR")
+ (format #f "/run/user/~s" (getuid)))))
+
(define (make-bare-init-file target)
"Return #t if a bare init file was created at TARGET; #f otherwise.
@@ -301,7 +306,7 @@ create a template configuration file if non exists."
(define default-socket-dir
(if (zero? (getuid))
%system-socket-dir
- (string-append %user-config-dir "/run")))
+ (string-append %user-runtime-dir "/shepherd")))
;; Unix domain socket for receiving commands in shepherd.
(define default-socket-file
This bug report was last modified 7 years and 340 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.