diff options
Diffstat (limited to '')
-rw-r--r-- | src/satd.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -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(); |