diff options
author | Ludovic Courtès <ludo@gnu.org> | 2020-06-12 00:03:07 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2020-06-12 00:04:42 +0200 |
commit | 8a02e45d93c2a825363da282791ac16f15b415e4 (patch) | |
tree | 474e5bb17ba0f51b6f6e235fe4d0cdd0ffa41ff4 | |
parent | b6b95685d0b478698d648f13afd927b1e1700d99 (diff) | |
download | guix-8a02e45d93c2a825363da282791ac16f15b415e4.tar.gz |
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.
-rw-r--r-- | gnu/build/shepherd.scm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index 47920a7b74..fd93e7f3f4 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 |