From 8bffa1c19fd05f4f04dad4b5b98f85b94f23113c Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 26 Jan 2015 22:26:57 +0000 Subject: - added s6-fdholder-delete(c) - small s6-fdholder-* fixes - s6-fdholder documentation (in review) - s6_svstatus_* bugfix (thanks Olivier Brunel) --- src/fdholder/s6-fdholderd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fdholder/s6-fdholderd.c') diff --git a/src/fdholder/s6-fdholderd.c b/src/fdholder/s6-fdholderd.c index 0404165..218e338 100644 --- a/src/fdholder/s6-fdholderd.c +++ b/src/fdholder/s6-fdholderd.c @@ -243,7 +243,7 @@ static int do_store (unsigned int cc, unixmessage_t const *m) if (numfds >= maxfds) { unixmessage_drop(m) ; - return answer(c, ENOSPC) ; + return answer(c, ENFILE) ; } if (avltreen_search(fds_by_id, m->s + TAIN_PACK + 1, &pp)) { @@ -639,7 +639,7 @@ int main (int argc, char const *const *argv, char const *const *envp) { int spfd ; int flag1 = 0 ; - unsigned int maxconn = 40 ; + unsigned int maxconn = 16 ; PROG = "s6-fdholderd" ; { @@ -760,7 +760,7 @@ int main (int argc, char const *const *argv, char const *const *envp) if (!r) { - if (!cont && !tain_future(&lameduckdeadline)) return 1 ; + if (!cont && !tain_future(&lameduckdeadline)) break ; for (;;) { if (!avltreeb_min(&fdmap_deadline, &i)) break ; @@ -793,6 +793,6 @@ int main (int argc, char const *const *argv, char const *const *envp) else client_add(&i, fd, &rre, &wre, flags) ; } } + return (~!numfds | (!!numconn << 1)) ; } - return 0 ; } -- cgit v1.2.3