summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-12-15 17:14:41 +0100
committerLudovic Courtès <ludo@gnu.org>2023-12-15 17:50:24 +0100
commitace4a3b2dba43b826640d5c1ca970f9040d27416 (patch)
treee78aa0c9545f9b127742c340f1aa01d95e514583
parentd5f25f2c115c6eb0a83dd6ededf5a337ec000ec2 (diff)
downloadshepherd-ace4a3b2dba43b826640d5c1ca970f9040d27416.tar.gz
service: Log PID files that do not show up.
Suggested by lrustand on #guix. * modules/shepherd/service.scm (make-forkexec-constructor): Add ‘local-output’ call for when ‘read-pid-file’ returns #f.
-rw-r--r--modules/shepherd/service.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index 0bfb064..61be309 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -1715,6 +1715,9 @@ start."
#:validate-pid? #t)
(#f
;; Send SIGTERM to the whole process group.
+ (local-output (l10n "PID file '~a' did not show up; \
+terminating process ~a.")
+ pid-file pid)
(catch-system-error (kill (- pid) SIGTERM))
#f)
((? integer? pid)