diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 20:25:21 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 20:25:21 +0100 |
commit | 24d9c657dd1043af74046df01dbec60235d32c87 (patch) | |
tree | 97ee1174488a5be1343c8f7eb58acbe385b8185d /src/satd.c | |
parent | ... (diff) | |
download | sat-24d9c657dd1043af74046df01dbec60235d32c87.tar.gz sat-24d9c657dd1043af74046df01dbec60235d32c87.tar.bz2 sat-24d9c657dd1043af74046df01dbec60235d32c87.tar.xz |
m + receive messages
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/satd.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -30,6 +30,7 @@ #include "daemonise.h" #include "common.h" +#include "daemon.h" @@ -243,16 +244,16 @@ main(int argc, char *argv[]) t (state == -1); free(path), path = NULL; - /* The state fill shall be on fd 4. */ - t (dup2_and_null(state, 4) == -1); - state = 4; + /* The state fill shall be on fd STATE_FILENO. */ + t (dup2_and_null(state, STATE_FILENO) == -1); + state = STATE_FILENO; /* Create socket. */ t (sock = create_socket(&address), sock == -1); - /* Socket shall be on fd 3. */ - t (dup2_and_null(sock, 3) == -1); - sock = 3; + /* Socket shall be on fd SOCK_FILENO. */ + t (dup2_and_null(sock, SOCK_FILENO) == -1); + sock = SOCK_FILENO; /* Listen for incoming conections. */ #if SOMAXCONN < SATD_BACKLOG |