diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 12:02:41 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 12:02:41 +0100 |
commit | e7cfad933c05102184d3ce63939dff11742dd46e (patch) | |
tree | 7c605eb9197f823bf46038e0b5adc795c665e00a /src/satd.c | |
parent | m (diff) | |
download | sat-e7cfad933c05102184d3ce63939dff11742dd46e.tar.gz sat-e7cfad933c05102184d3ce63939dff11742dd46e.tar.bz2 sat-e7cfad933c05102184d3ce63939dff11742dd46e.tar.xz |
listen
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
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(); |