guix-commits
[Top][All Lists]
Advanced

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

[shepherd] 02/03: service: Log PID files that do not show up.


From: Ludovic Courtès
Subject: [shepherd] 02/03: service: Log PID files that do not show up.
Date: Fri, 15 Dec 2023 11:51:16 -0500 (EST)

civodul pushed a commit to branch master
in repository shepherd.

commit ace4a3b2dba43b826640d5c1ca970f9040d27416
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Dec 15 17:14:41 2023 +0100

    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.
---
 modules/shepherd/service.scm | 3 +++
 1 file changed, 3 insertions(+)

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)



reply via email to

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