Browse Source

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.
gn-latest-20200725
Ludovic Courtès 1 year ago
parent
commit
8a02e45d93
No known key found for this signature in database GPG Key ID: 90B11993D9AEBB5
  1. 3
      gnu/build/shepherd.scm

3
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

Loading…
Cancel
Save