guix-commits
[Top][All Lists]
Advanced

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

02/02: shepherd: 'read-pid-file/container' terminates the whole process


From: guix-commits
Subject: 02/02: shepherd: 'read-pid-file/container' terminates the whole process group.
Date: Thu, 11 Jun 2020 18:05:15 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 8a02e45d93c2a825363da282791ac16f15b415e4
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Jun 12 00:03:07 2020 +0200

    shepherd: 'read-pid-file/container' terminates the whole process group.
    
    This mirrors a change made in the Shepherd 0.8.0.  Previously, upon
    startup failure, we could have left processes behind.
    
    * gnu/build/shepherd.scm (read-pid-file/container): Kill (- PID) instead
    of PID.
---
 gnu/build/shepherd.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index 47920a7..fd93e7f 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -105,7 +105,8 @@ separate mount and PID name space.  Return the \"outer\" 
PID. "
              (read-pid-file pid-file
                             #:max-delay max-delay)))
     (#f
-     (catch-system-error (kill pid SIGTERM))
+     ;; Send SIGTERM to the whole process group.
+     (catch-system-error (kill (- pid) SIGTERM))
      #f)
     ((? integer? container-pid)
      ;; XXX: When COMMAND is started in a separate PID namespace, its



reply via email to

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