summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-10-05 02:04:55 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-10-05 02:04:55 +0000
commit478dd24279f833042a94590df0726d163b576af5 (patch)
tree406f30dc68e46b6c6b5332d1d8cad68188a0a02a /src
parent58213b173705a7d02f1ec85cff6230973a237cb3 (diff)
downloads6-478dd24279f833042a94590df0726d163b576af5.tar.xz
- minor bugfix in s6-log (correct return when stat() fails)v2.2.1.1
- remove fucking -Bsymbolic - add s6-setsid to stage 1 example - prepare shutdown functionality for s6-svscan - version: 2.2.1.1
Diffstat (limited to 'src')
-rw-r--r--src/daemontools-extras/s6-log.c2
-rw-r--r--src/supervision/s6-svscan.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c
index 6d323b7..4c761d0 100644
--- a/src/daemontools-extras/s6-log.c
+++ b/src/daemontools-extras/s6-log.c
@@ -287,7 +287,7 @@ static int finish (logdir_t *ldp, char const *name, char suffix)
byte_copy(x, dirlen, ldp->dir) ;
x[dirlen] = '/' ;
byte_copy(x + dirlen + 1, namelen + 1, name) ;
- if (stat(x, &st) < 0) return errno == ENOENT ;
+ if (stat(x, &st) < 0) return errno == ENOENT ? 0 : -1 ;
if (st.st_nlink == 1)
{
char y[dirlen + 29] ;
diff --git a/src/supervision/s6-svscan.c b/src/supervision/s6-svscan.c
index c66b18f..8153186 100644
--- a/src/supervision/s6-svscan.c
+++ b/src/supervision/s6-svscan.c
@@ -23,6 +23,7 @@
#define USAGE "s6-svscan [ -c maxservices ] [ -t timeout ] [ dir ]"
+#define SHUTDOWN_PROG S6_SVSCAN_CTLDIR "/shutdown"
#define FINISH_PROG S6_SVSCAN_CTLDIR "/finish"
#define CRASH_PROG S6_SVSCAN_CTLDIR "/crash"