summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_servicedir_block.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6rc/s6rc_servicedir_block.c')
-rw-r--r--src/libs6rc/s6rc_servicedir_block.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libs6rc/s6rc_servicedir_block.c b/src/libs6rc/s6rc_servicedir_block.c
index a7e2b12..bfa6440 100644
--- a/src/libs6rc/s6rc_servicedir_block.c
+++ b/src/libs6rc/s6rc_servicedir_block.c
@@ -1,8 +1,8 @@
/* ISC license. */
#include <string.h>
-#include <errno.h>
#include <unistd.h>
+#include <skalibs/posixplz.h>
#include <skalibs/djbunix.h>
#include <s6/s6-supervise.h>
#include <s6-rc/s6rc-servicedir.h>
@@ -18,9 +18,7 @@ int s6rc_servicedir_block (char const *dir)
if (!touch(fn)) return -1 ;
if (s6_svc_writectl(dir, S6_SUPERVISE_CTLDIR, "O", 1) < 0)
{
- int e = errno ;
- unlink(fn) ;
- errno = e ;
+ unlink_void(fn) ;
return -1 ;
}
return status.flagwantup ;