summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-01-27 11:44:29 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-01-27 11:44:29 +0000
commitf05b37667624eb178a0d856da339d003f7d63b6e (patch)
tree4dbeab59367bad8d7034fec9d4263cb2653c3ef0
parentd56b7ec51b1ae08b4ec414fd079bf96a40b270c3 (diff)
downloads6-f05b37667624eb178a0d856da339d003f7d63b6e.tar.xz
- clang build fixv2.1.0.1
- s6-fdholder-daemon ltimeout bugfix - rc for v2.1.0.1
-rw-r--r--doc/index.html2
-rw-r--r--doc/upgrade.html6
-rw-r--r--package/info2
-rw-r--r--src/fdholder/s6-fdholder-daemon.c2
-rw-r--r--src/fdholder/s6-fdholderd.c49
5 files changed, 37 insertions, 24 deletions
diff --git a/doc/index.html b/doc/index.html
index 7b824b0..bf3252a 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -99,7 +99,7 @@ library. </li>
<h3> Download </h3>
<ul>
- <li> The current released version of s6 is <a href="s6-2.1.0.0.tar.gz">2.1.0.0</a>. </li>
+ <li> The current released version of s6 is <a href="s6-2.1.0.1.tar.gz">2.1.0.1</a>. </li>
<li> Alternatively, you can checkout a copy of the s6 git repository:
<pre> git clone git://git.skarnet.org/s6 </pre> </li>
</ul>
diff --git a/doc/upgrade.html b/doc/upgrade.html
index 4538ef4..c7c0094 100644
--- a/doc/upgrade.html
+++ b/doc/upgrade.html
@@ -17,6 +17,12 @@
<h1> What has changed in s6 </h1>
+<h2> in 2.1.0.1 </h2>
+
+<p>
+ Bugfix release, no important changes.
+</p>
+
<h2> in 2.1.0.0 </h2>
<ul>
diff --git a/package/info b/package/info
index bf6ca38..baabbb6 100644
--- a/package/info
+++ b/package/info
@@ -1,4 +1,4 @@
package=s6
-version=2.1.0.0
+version=2.1.0.1
category=admin
package_macro_name=S6
diff --git a/src/fdholder/s6-fdholder-daemon.c b/src/fdholder/s6-fdholder-daemon.c
index 18d189c..46c4923 100644
--- a/src/fdholder/s6-fdholder-daemon.c
+++ b/src/fdholder/s6-fdholder-daemon.c
@@ -136,7 +136,7 @@ int main (int argc, char const *const *argv, char const *const *envp)
{
newargv[m++] = "-T" ;
newargv[m++] = fmt + pos ;
- pos += uint_fmt(fmt + pos, timeout) ;
+ pos += uint_fmt(fmt + pos, ltimeout) ;
fmt[pos++] = 0 ;
}
if (rulesdir)
diff --git a/src/fdholder/s6-fdholderd.c b/src/fdholder/s6-fdholderd.c
index 218e338..58eecdc 100644
--- a/src/fdholder/s6-fdholderd.c
+++ b/src/fdholder/s6-fdholderd.c
@@ -713,23 +713,30 @@ int main (int argc, char const *const *argv, char const *const *envp)
{
/* Hello, stack. I have a present for you. */
- GENSETB_TYPE(client_t, 1+maxconn) clientblob ;
- GENSETB_TYPE(s6_fdholder_fd_t, maxfds) fdblob ;
- AVLTREEB_TYPE(maxfds) fdmap_id ;
- AVLTREEB_TYPE(maxfds) fdmap_deadline ;
+ genset clientinfo, fdinfo ;
+ avltreen fdidinfo, fddeadlineinfo ;
iopause_fd x[2 + maxconn] ;
+ client_t clientstorage[1+maxconn] ;
+ unsigned int clientfreelist[1+maxconn] ;
+ s6_fdholder_fd_t fdstorage[maxfds] ;
+ unsigned int fdfreelist[maxfds] ;
+ avlnode fdidstorage[maxfds] ;
+ unsigned int fdidfreelist[maxfds] ;
+ avlnode fddeadlinestorage[maxfds] ;
+ unsigned int fddeadlinefreelist[maxfds] ;
/* Hope you enjoyed it! Have a nice day! */
- GENSETB_init(client_t, &clientblob, 1+maxconn) ;
- clients = &clientblob.info ;
- sentinel = gensetb_new(&clientblob) ;
- clientblob.storage[sentinel].next = sentinel ;
- GENSETB_init(s6_fdholder_t, &fdblob, maxfds) ;
- fdstore = &fdblob.info ;
- avltreeb_init(&fdmap_id, maxfds, &fds_id_dtok, &fds_id_cmp, 0) ;
- fds_by_id = &fdmap_id.info ;
- avltreeb_init(&fdmap_deadline, maxfds, &fds_deadline_dtok, &fds_deadline_cmp, 0) ;
- fds_by_deadline = &fdmap_deadline.info ;
+ GENSET_init(&clientinfo, client_t, clientstorage, clientfreelist, 1+maxconn) ;
+ clients = &clientinfo ;
+ sentinel = genset_new(clients) ;
+ clientstorage[sentinel].next = sentinel ;
+ GENSET_init(&fdinfo, s6_fdholder_fd_t, fdstorage, fdfreelist, maxfds) ;
+ fdstore = &fdinfo ;
+ avltreen_init(&fdidinfo, fdidstorage, fdidfreelist, maxfds, &fds_id_dtok, &fds_id_cmp, 0) ;
+ fds_by_id = &fdidinfo ;
+ avltreen_init(&fddeadlineinfo, fddeadlinestorage, fddeadlinefreelist, maxfds, &fds_deadline_dtok, &fds_deadline_cmp, 0) ;
+ fds_by_deadline = &fddeadlineinfo ;
+
x[0].fd = spfd ; x[0].events = IOPAUSE_READ ;
x[1].fd = 0 ;
@@ -749,9 +756,9 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (cont) tain_add_g(&deadline, &tain_infinite_relative) ;
else deadline = lameduckdeadline ;
- if (avltreeb_min(&fdmap_deadline, &i) && tain_less(&FD(i)->limit, &deadline)) deadline = FD(i)->limit ;
+ if (avltreen_min(fds_by_deadline, &i) && tain_less(&FD(i)->limit, &deadline)) deadline = FD(i)->limit ;
x[1].events = (cont && (numconn < maxconn)) ? IOPAUSE_READ : 0 ;
- for (i = clientblob.storage[sentinel].next ; i != sentinel ; i = clientblob.storage[i].next)
+ for (i = clientstorage[sentinel].next ; i != sentinel ; i = clientstorage[i].next)
if (client_prepare_iopause(i, &deadline, x, &j)) r = 0 ;
if (!cont && r) break ;
@@ -763,22 +770,22 @@ int main (int argc, char const *const *argv, char const *const *envp)
if (!cont && !tain_future(&lameduckdeadline)) break ;
for (;;)
{
- if (!avltreeb_min(&fdmap_deadline, &i)) break ;
+ if (!avltreen_min(fds_by_deadline, &i)) break ;
if (tain_future(&FD(i)->limit)) break ;
fd_close(FD(i)->fd) ;
fds_delete(i) ;
}
- for (j = sentinel, i = clientblob.storage[sentinel].next ; i != sentinel ; j = i, i = clientblob.storage[i].next)
- if (!tain_future(&clientblob.storage[i].deadline)) removeclient(&i, j) ;
+ for (j = sentinel, i = clientstorage[sentinel].next ; i != sentinel ; j = i, i = clientstorage[i].next)
+ if (!tain_future(&clientstorage[i].deadline)) removeclient(&i, j) ;
continue ;
}
if (x[0].revents & IOPAUSE_READ) handle_signals() ;
- for (j = sentinel, i = clientblob.storage[sentinel].next ; i != sentinel ; j = i, i = clientblob.storage[i].next)
+ for (j = sentinel, i = clientstorage[sentinel].next ; i != sentinel ; j = i, i = clientstorage[i].next)
if (!client_flush(i, x)) removeclient(&i, j) ;
- for (j = sentinel, i = clientblob.storage[sentinel].next ; i != sentinel ; j = i, i = clientblob.storage[i].next)
+ for (j = sentinel, i = clientstorage[sentinel].next ; i != sentinel ; j = i, i = clientstorage[i].next)
if (!client_read(i, x)) removeclient(&i, j) ;
if (x[1].revents & IOPAUSE_READ)