summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libs6rc/s6rc_servicedir_internal.c1
-rw-r--r--src/s6-rc/s6-rc-compile.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/src/libs6rc/s6rc_servicedir_internal.c b/src/libs6rc/s6rc_servicedir_internal.c
index f84b6fb..ba7e6b9 100644
--- a/src/libs6rc/s6rc_servicedir_internal.c
+++ b/src/libs6rc/s6rc_servicedir_internal.c
@@ -18,6 +18,7 @@ static s6rc_servicedir_desc_t const svdir_file_list[] =
{ .name = "run", .type = FILETYPE_NORMAL, .options = SVFILE_EXECUTABLE | SVFILE_MANDATORY | SVFILE_ATOMIC },
{ .name = "run.user", .type = FILETYPE_NORMAL, .options = SVFILE_EXECUTABLE },
{ .name = "notification-fd", .type = FILETYPE_UINT, .options = 0 },
+ { .name = "lock-fd", .type = FILETYPE_UINT, .options = 0 },
{ .name = "timeout-kill", .type = FILETYPE_UINT, .options = 0 },
{ .name = "timeout-finish", .type = FILETYPE_UINT, .options = 0 },
{ .name = "max-death-tally", .type = FILETYPE_UINT, .options = 0 },
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 374946f..84f7bdc 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -1310,6 +1310,15 @@ static inline void write_servicedirs (char const *compiled, s6rc_db_t const *db,
strerr_warnw4x("longrun ", db->string + db->services[i].name, " has a notification-fd of ", fmt) ;
}
+ memcpy(srcfn + srcdirlen + len + 2, "lock-fd", 8) ;
+ memcpy(dstfn + clen + 14 + len, "lock-fd", 8) ;
+ if (copy_uint(compiled, srcfn, dstfn, &u) && u < 3 && verbosity)
+ {
+ char fmt[UINT_FMT] ;
+ fmt[uint_fmt(fmt, u)] = 0 ;
+ strerr_warnw4x("longrun ", db->string + db->services[i].name, " has a lock-fd of ", fmt) ;
+ }
+
memcpy(srcfn + srcdirlen + len + 2, "timeout-kill", 13) ;
memcpy(dstfn + clen + 14 + len, "timeout-kill", 13) ;
copy_uint(compiled, srcfn, dstfn, &u) ;