From 53e51768c75662a66a8b5656ee557640376d252b Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 20 Jun 2015 11:55:43 +0000 Subject: - Remove extra newline in s6-rc list - Add notification-fd support in s6-rc-compile --- src/s6-rc/s6-rc-compile.c | 7 +++++-- src/s6-rc/s6-rc.c | 1 - 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) -- cgit v1.2.3