diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-04-23 16:17:10 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-04-23 16:17:10 +0000 |
| commit | 0d15a912d307df2bbe9396a2d819596c0d7824bb (patch) | |
| tree | bbd6934a77e14f800df2b26e04ed4e921307b2dc | |
| parent | d73a1da020f7bff7a1c37c542a7ebcfc26118446 (diff) | |
| download | s6-0d15a912d307df2bbe9396a2d819596c0d7824bb.tar.gz | |
Add flag-timeout-killpg for killing the whole pgroup after timeout-kill
| -rw-r--r-- | doc/s6-supervise.html | 13 | ||||
| -rw-r--r-- | doc/servicedir.html | 5 | ||||
| -rw-r--r-- | src/supervision/s6-supervise.c | 3 |
3 files changed, 16 insertions, 5 deletions
diff --git a/doc/s6-supervise.html b/doc/s6-supervise.html index 8b53bbf..d45b23b 100644 --- a/doc/s6-supervise.html +++ b/doc/s6-supervise.html @@ -66,10 +66,15 @@ of certain files in the service directory. <p> s6-supervise does not support options, because it is normally not run -manually via a command line; it is usually launched by its own -supervisor, <a href="s6-svscan.html">s6-svscan</a>. The way to -tune s6-supervise's behaviour is via files in the -<a href="servicedir.html">service directory</a>. +manually via a command line; it is usually launched by +<a href="s6-svscan.html">s6-svscan</a> as part of a supervision tree. +</p> + +<p> + The way to tune s6-supervise's behaviour is via +<a href="servicedir.html">files in the service directory</a>. There +are a lot of configuration knobs there; if you want to get the most +out of your supervisor, reading this page is strongly advised. </p> <h2> Readiness notification support </h2> diff --git a/doc/servicedir.html b/doc/servicedir.html index 722f71a..ced24d6 100644 --- a/doc/servicedir.html +++ b/doc/servicedir.html @@ -188,6 +188,11 @@ exist, or contains 0 or an invalid value, then the service is never forcibly killed (unless, of course, an <a href="s6-svc.html">s6-svc -k</a> command is sent). </li> + <li style="margin-bottom:1em"> An optional regular file named <tt>flag-timeout-killpg</tt>. If such a file +exists <em>and</em> a nonzero <tt>timeout-kill</tt> is defined, then at the end of the +timeout, the SIGKILL is sent to the whole process group of the service, instead of to +the pid of the service only. </li> + <li style="margin-bottom:1em"> An optional regular file named <tt>timeout-finish</tt>. If such a file exists, it must only contain an unsigned integer, which is the number of milliseconds after which the <tt>./finish</tt> script, if it exists, will diff --git a/src/supervision/s6-supervise.c b/src/supervision/s6-supervise.c index 50a739f..0547bd0 100644 --- a/src/supervision/s6-supervise.c +++ b/src/supervision/s6-supervise.c @@ -520,7 +520,8 @@ static void uptimeout (void) { if (gflags.dying) { - killk() ; + if (check_file("flag-timeout-killpg")) killK() ; + else killk() ; settimeout(5) ; } else |
