summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-06-24 18:32:00 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-06-24 18:32:00 +0000
commit37e5d983ad574b7287b13a17abfb64d61a7203ee (patch)
treeef4a3d379aa99d2dbe718c22819945daab1bffa3
parenta789b81c23824d88ac75421697504196594e4eff (diff)
downloads6-rc-37e5d983ad574b7287b13a17abfb64d61a7203ee.tar.xz
s6-rc-init: remove dangling symlink when manage() fails
-rw-r--r--src/s6-rc/s6-rc-init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/s6-rc/s6-rc-init.c b/src/s6-rc/s6-rc-init.c
index 5551d6e..b591cc0 100644
--- a/src/s6-rc/s6-rc-init.c
+++ b/src/s6-rc/s6-rc-init.c
@@ -121,6 +121,7 @@ int main (int argc, char const *const *argv)
deref = s6rc_servicedir_manage_g(live, prefix, &deadline) ;
if (!deref)
{
+ unlink_void(live) ;
cleanup(&sa) ;
strerr_diefu3sys(111, "supervise service directories in ", live, "/servicedirs") ;
}