summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2017-05-19 11:59:55 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2017-05-19 11:59:55 +0000
commit27cdf38764d3ce9b1b366f6d86e5f4f6e45bdafd (patch)
treec7500c8d4e6b47fc95d46d1bcb67853558f991f7
parentee7925ff752efa272d335bca53240abca9256f6f (diff)
downloads6-rc-27cdf38764d3ce9b1b366f6d86e5f4f6e45bdafd.tar.xz
Add support for timeout-kill
-rw-r--r--NEWS1
-rw-r--r--doc/s6-rc-compile.html3
-rw-r--r--src/libs6rc/s6rc_servicedir_internal.c1
-rw-r--r--src/s6-rc/s6-rc-compile.c4
4 files changed, 8 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index b803c39..0c6c179 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ In 0.2.0.1
----------
- Bugfix release.
+ - Support for timeout-kill (in s6-2.5.1.0) included.
In 0.2.0.0
diff --git a/doc/s6-rc-compile.html b/doc/s6-rc-compile.html
index cfacde1..453c6ac 100644
--- a/doc/s6-rc-compile.html
+++ b/doc/s6-rc-compile.html
@@ -274,7 +274,8 @@ about pipelines. </li>
<ul>
<li> A mandatory regular file named <tt>run</tt>, as well as optional files
-named <tt>finish</tt>, <tt>notification-fd</tt> and <tt>nosetsid</tt>. These
+named <tt>finish</tt>, <tt>notification-fd</tt>, <tt>timeout-kill</tt>,
+<tt>timeout-finish</tt> and <tt>nosetsid</tt>. These
files will be copied, or recreated, in the generated
<a href="http://skarnet.org/software/s6/servicedir.html">service directory</a>:
they are meant to be used by the
diff --git a/src/libs6rc/s6rc_servicedir_internal.c b/src/libs6rc/s6rc_servicedir_internal.c
index db6b180..1162093 100644
--- a/src/libs6rc/s6rc_servicedir_internal.c
+++ b/src/libs6rc/s6rc_servicedir_internal.c
@@ -16,6 +16,7 @@ static s6rc_servicedir_desc_t const svdir_file_list[] =
{ .name = "run.user", .type = FILETYPE_NORMAL, .options = SVFILE_EXECUTABLE },
{ .name = "nosetsid", .type = FILETYPE_EMPTY, .options = 0 },
{ .name = "notification-fd", .type = FILETYPE_UINT, .options = 0 },
+ { .name = "timeout-kill", .type = FILETYPE_UINT, .options = 0 },
{ .name = "timeout-finish", .type = FILETYPE_UINT, .options = 0 },
{ .name = "data", .type = FILETYPE_DIR, .options = 0 },
{ .name = "env", .type = FILETYPE_DIR, .options = 0 },
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 60bae6b..fc3d790 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -1247,6 +1247,10 @@ static inline void write_servicedirs (char const *compiled, s6rc_db_t const *db,
}
}
+ memcpy(srcfn + srcdirlen + len + 2, "timeout-kill", 13) ;
+ memcpy(dstfn + clen + 14 + len, "timeout-kill", 13) ;
+ filecopy_unsafe(srcfn, dstfn, 0644) ;
+
memcpy(srcfn + srcdirlen + len + 2, "timeout-finish", 15) ;
memcpy(dstfn + clen + 14 + len, "timeout-finish", 15) ;
filecopy_unsafe(srcfn, dstfn, 0644) ;