summaryrefslogtreecommitdiff
path: root/src/libs6rc/s6rc_servicedir_block.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 11:31:45 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 11:31:45 +0000
commitc8a41df9c5b16dce89ae008a0187c6d606013b61 (patch)
tree1b065ab6cc74ec4522b51b30b13b9cdb25153b7d /src/libs6rc/s6rc_servicedir_block.c
parent1626bf78dd47a42ce37e984025a434a666fc5bbf (diff)
downloads6-rc-c8a41df9c5b16dce89ae008a0187c6d606013b61.tar.xz
Adapt to skalibs-2.7.0.0
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 ;