summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/index.html2
-rw-r--r--doc/upgrade.html6
-rw-r--r--package/info2
-rw-r--r--src/s6-rc/s6-rc-compile.c13
-rw-r--r--src/s6-rc/s6-rc-update.c2
5 files changed, 21 insertions, 4 deletions
diff --git a/doc/index.html b/doc/index.html
index 8f76331..fe803e3 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -67,7 +67,7 @@ requirement if you link against the shared version of the skalibs library. </li>
<ul>
<li> The current released version of s6-rc is
-<a href="s6-rc-0.5.4.3.tar.gz">0.5.4.3</a>. </li>
+<a href="s6-rc-0.5.4.4.tar.gz">0.5.4.4</a>. </li>
<li> Alternatively, you can checkout a copy of the
<a href="//git.skarnet.org/cgi-bin/cgit.cgi/s6-rc/">s6-rc
git repository</a>:
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 4d0a8a7..9d85be0 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -30,6 +30,12 @@ minor and bugfix version changes.
<h1> What has changed in s6-rc </h1>
+<h2> in 0.5.4.4 </h2>
+
+<ul>
+ <li> No functional changes. </li>
+</ul>
+
<h2> in 0.5.4.3 </h2>
<ul>
diff --git a/package/info b/package/info
index 8f6e8ad..d743b80 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6-rc
-version=0.5.4.3
+version=0.5.4.4
category=admin
package_macro_name=S6RC
diff --git a/src/s6-rc/s6-rc-compile.c b/src/s6-rc/s6-rc-compile.c
index 350662d..0247053 100644
--- a/src/s6-rc/s6-rc-compile.c
+++ b/src/s6-rc/s6-rc-compile.c
@@ -1087,6 +1087,7 @@ static inline void write_oneshot_runner (char const *compiled, int blocking)
static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, char const *fdhuser)
{
+ unsigned int nfds = 0 ;
size_t base = satmp.len ;
char fn[61 + S6RC_FDHOLDER_LEN] = "servicedirs/" S6RC_FDHOLDER "/data/rules/uid/0/env" ;
make_skel(compiled, S6RC_FDHOLDER, 1) ;
@@ -1106,8 +1107,12 @@ static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, ch
for (uint32_t j = 0 ; j < db->nlong ; j++)
if (db->services[j].x.longrun.nproducers)
+ {
if (!stralloc_cats(&satmp, db->string + db->services[j].name)
|| !stralloc_catb(&satmp, "\n", 1)) dienomem() ;
+ nfds += 2 ;
+ }
+ if (nfds < 240) nfds = 256 ; else nfds += (nfds >> 4) + 2 ;
auto_file(compiled, "servicedirs/" S6RC_FDHOLDER "/data/autofilled", satmp.s + base, satmp.len - base) ;
satmp.len = base ;
@@ -1129,7 +1134,13 @@ static inline void write_fdholder (char const *compiled, s6rc_db_t const *db, ch
|| !string_quote(&satmp, fdhuser, strlen(fdhuser))
|| !stralloc_catb(&satmp, "\n", 1)) dienomem() ;
}
- if (!stralloc_cats(&satmp, S6_EXTBINPREFIX "s6-fdholder-daemon -1 ")) dienomem() ;
+ if (!stralloc_cats(&satmp, S6_EXTBINPREFIX "s6-fdholder-daemon -1 -n ")) dienomem() ;
+ {
+ char fmt[UINT_FMT] ;
+ size_t len = uint_fmt(fmt, nfds) ;
+ fmt[len++] = ' ' ;
+ if (!stralloc_catb(&satmp, fmt, len)) dienomem() ;
+ }
if (fdhuser)
{
if (!stralloc_cats(&satmp, "-U ")) dienomem() ;
diff --git a/src/s6-rc/s6-rc-update.c b/src/s6-rc/s6-rc-update.c
index 7387e07..830214d 100644
--- a/src/s6-rc/s6-rc-update.c
+++ b/src/s6-rc/s6-rc-update.c
@@ -535,7 +535,7 @@ static inline void update_fdholder (s6rc_db_t const *olddb, unsigned char const
pid_t pid ;
int wstat ;
char tfmt[UINT_FMT] ;
- char const *newargv[7] = { S6_EXTBINPREFIX "s6-svc", "-T", tfmt, "-twR", "--", fnsocket, 0 } ;
+ char const *newargv[7] = { S6_EXTBINPREFIX "s6-svc", "-T", tfmt, "-rwR", "--", fnsocket, 0 } ;
fill_tfmt(tfmt, deadline) ;
fnsocket[livelen + sizeof("/servicedirs/" S6RC_FDHOLDER) - 1] = 0 ;
pid = cspawn(newargv[0], newargv, envp, 0, 0, 0) ;