summaryrefslogtreecommitdiff
path: root/src
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 /src
parentee7925ff752efa272d335bca53240abca9256f6f (diff)
downloads6-rc-27cdf38764d3ce9b1b366f6d86e5f4f6e45bdafd.tar.xz
Add support for timeout-kill
Diffstat (limited to 'src')
-rw-r--r--src/libs6rc/s6rc_servicedir_internal.c1
-rw-r--r--src/s6-rc/s6-rc-compile.c4
2 files changed, 5 insertions, 0 deletions
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) ;