diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-06 09:24:52 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2021-05-06 09:24:52 +0000 |
commit | d6134f6b911daa0ac0e8086a4ab2d146ec8b6e04 (patch) | |
tree | ee72d7eebca8e09d7f93b4ce2d7d87be5580856f /src | |
parent | b91fbbaec727408a6b401549f8c233db0284c62c (diff) | |
download | s6-rc-d6134f6b911daa0ac0e8086a4ab2d146ec8b6e04.tar.xz |
Clean up scandir after update
Diffstat (limited to 'src')
-rw-r--r-- | src/s6-rc/s6-rc-update.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c index 7308c5b..eb6104a 100644 --- a/src/s6-rc/s6-rc-update.c +++ b/src/s6-rc/s6-rc-update.c @@ -779,6 +779,19 @@ int main (int argc, char const *const *argv, char const *const *envp) strerr_warni1x("updating s6rc-fdholder pipe storage") ; update_fdholder(&olddb, oldstate, &newdb, newstate, invimage, envp, &deadline) ; + + /* Clean up scandir */ + + if (verbosity >= 2) + strerr_warni1x("cleaning up scan directory") ; + + { + char scdir[livelen + 9] ; + memcpy(scdir, live, livelen) ; + memcpy(scdir + livelen, "/scandir", 9) ; + if (s6_svc_writectl(scdir, S6_SVSCAN_CTLDIR, "an", 2) <= 0) + strerr_warnwu2sys("send command to s6-svscan on ", scdir) ; + } } |