From 5ea3cc0090b4e1717b9ab2b49c4d93eb75dbeb67 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Sun, 24 Apr 2016 11:46:00 +0200 Subject: [PATCH] Reduce max backlog in listen(): 20 --> 10 Both the original MIT Athena inetd and the GNU inetutils inetd only keep a backlog of 10 connections in listen() for TCP sockets. This patch adjusts the Finit hard coded default accordingly. Signed-off-by: Joachim Nilsson --- inetd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inetd.c b/inetd.c index 2edab2ab..93138799 100644 --- a/inetd.c +++ b/inetd.c @@ -228,7 +228,7 @@ static int spawn_socket(inetd_t *inetd) if (inetd->port) { if (inetd->type == SOCK_STREAM) { - if (-1 == listen(sd, 20)) { + if (-1 == listen(sd, 10)) { FLOG_PERROR("Failed listening to inetd service %s", inetd->name); close(sd); return -errno;