summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-09-07 12:15:41 +0000
committerLaurent Bercot <ska@appnovation.com>2021-09-07 12:15:41 +0000
commitf958b41a6e7a3124e95d48fe72bbf87fce0e2fce (patch)
treef9a1a7c159c62cc84392f7bdcf97da1303649d0a
parentd9488baa63351cafd237f5af15018ea5898ec0bc (diff)
downloads6-f958b41a6e7a3124e95d48fe72bbf87fce0e2fce.tar.xz
svlink bugfix
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--doc/s6-svlink.html4
-rw-r--r--doc/s6-svunlink.html5
-rw-r--r--src/supervision/s6-svlink.c2
3 files changed, 10 insertions, 1 deletions
diff --git a/doc/s6-svlink.html b/doc/s6-svlink.html
index 7682e37..c1b9e94 100644
--- a/doc/s6-svlink.html
+++ b/doc/s6-svlink.html
@@ -105,6 +105,10 @@ supervisors one at a time, can be used instead. </li>
<li> If <em>servicedir</em> is logged, i.e. <em>servicedir</em><tt>/log</tt>
is also a valid service directory, then <tt>s6-svlink</tt> will wait until
supervisors have been spawned for both the service and its logger. </li>
+ <li> <tt>s6-svlink</tt> sends a <a href="s6-svscanctl.html">s6-svscanctl -a</a>
+command to <em>scandir</em>, which means that the system's view of services
+will be refreshed. Depending on what links exist in <em>scandir</em>, other
+services than <em>servicedir</em> may also appear. </li>
<li> The symmetrical program to <tt>s6-svlink</tt> is named
<a href="s6-svunlink.html">s6-svunlink</a>. </li>
</ul>
diff --git a/doc/s6-svunlink.html b/doc/s6-svunlink.html
index f3642be..371f5bd 100644
--- a/doc/s6-svunlink.html
+++ b/doc/s6-svunlink.html
@@ -84,6 +84,11 @@ situations that are nominal failures. For instance, it returns 0 even
if its timeout expires; the rationale is that there is no sensible action
for the user to do if this error is reported. <tt>s6-svunlink</tt> only
reports errors when they uncover a deeper problem in the system. </li>
+ <li> <tt>s6-svunlink</tt> sends a <a href="s6-svscanctl.html">s6-svscanctl -an</a>
+command to <em>scandir</em>, which means that the system's view of services
+will be refreshed and inactive services will be killed and unsupervised.
+Depending on what links exist in <em>scandir</em>, new
+services may appear, and other services than <em>name</em> may disappear. </li>
</ul>
</body>
diff --git a/src/supervision/s6-svlink.c b/src/supervision/s6-svlink.c
index d36ceab..4f36f3d 100644
--- a/src/supervision/s6-svlink.c
+++ b/src/supervision/s6-svlink.c
@@ -42,7 +42,7 @@ static inline void checkservicedir (char const *s)
size_t len = strlen(s) ;
char fn[len + 9] ;
memcpy(fn, s, len) ;
- memcpy(fn + len, "/run", 4) ;
+ memcpy(fn + len, "/run", 5) ;
if (stat(fn, &st) == -1) strerr_diefu2sys(111, "stat ", fn) ;
if (!(st.st_mode & S_IXUSR)) strerr_dief2x(100, fn, " is not executable") ;
r = s6_svc_ok(s) ;