aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/satd.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/satd.c b/src/satd.c
index 0f7e200..490f1e9 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -30,6 +30,15 @@
+/**
+ * The size of the backlog on the socket.
+ */
+#ifndef SATD_BACKLOG
+# define SATD_BACKLOG 5
+#endif
+
+
+
COMMAND("satd")
USAGE("[-f]")
@@ -103,6 +112,12 @@ main(int argc, char *argv[])
close(sock), sock = 3;
}
+#ifdef SOMAXCONN < SATD_BACKLOG
+ t (listen(sock, SOMAXCONN));
+#else
+ t (listen(sock, SATD_BACKLOG));
+#endif
+
close(sock);
unlink(address.sun_path);
undaemonise();