summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-06-20 11:55:43 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-06-20 11:55:43 +0000
commit53e51768c75662a66a8b5656ee557640376d252b (patch)
treeae97cfe7514b27e301b6b4847540aea2622b7f07 /src
parent1141d970b111af0307ed323b85ae9cc7edc8f97e (diff)
downloads6-rc-53e51768c75662a66a8b5656ee557640376d252b.tar.xz
- Remove extra newline in s6-rc list
- Add notification-fd support in s6-rc-compile
Diffstat (limited to 'src')
-rw-r--r--src/s6-rc/s6-rc-compile.c7
-rw-r--r--src/s6-rc/s6-rc.c1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 208f451..b056f64 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -971,8 +971,8 @@ static void write_servicedir (char const *compiled, char const *srcdir, char con
unsigned int srclen = str_len(src) ;
unsigned int dstlen = str_len(dst) ;
struct stat st ;
- char dstfn[clen + 23 + dstlen] ;
- char srcfn[srcdirlen + srclen + 11] ;
+ char dstfn[clen + 30 + dstlen] ;
+ char srcfn[srcdirlen + srclen + 18] ;
byte_copy(dstfn, clen, compiled) ;
byte_copy(dstfn + clen, 13, "/servicedirs/") ;
byte_copy(dstfn + clen + 13, dstlen + 1, dst) ;
@@ -994,6 +994,9 @@ static void write_servicedir (char const *compiled, char const *srcdir, char con
byte_copy(dstfn + clen + 14 + dstlen, 7, "finish") ;
byte_copy(srcfn + srcdirlen + srclen + 2, 7, "finish") ;
filecopy(srcfn, dstfn, 0755) ;
+ byte_copy(dstfn + clen + 14 + dstlen, 16, "notification-fd") ;
+ byte_copy(srcfn + srcdirlen + srclen + 2, 16, "notification-fd") ;
+ filecopy(srcfn, dstfn, 0755) ;
byte_copy(srcfn + srcdirlen + srclen + 2, 9, "nosetsid") ;
if (stat(srcfn, &st) < 0)
diff --git a/src/s6-rc/s6-rc.c b/src/s6-rc/s6-rc.c
index 8e8ba32..eb01789 100644
--- a/src/s6-rc/s6-rc.c
+++ b/src/s6-rc/s6-rc.c
@@ -67,7 +67,6 @@ static void print_services (void)
buffer_puts(buffer_1, db->string + db->services[i].name) ;
buffer_put(buffer_1, "\n", 1) ;
}
- buffer_putflush(buffer_1, "\n", 1) ;
}
static pid_t start_oneshot (unsigned int i, int h)