aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 20:25:21 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 20:25:21 +0100
commit24d9c657dd1043af74046df01dbec60235d32c87 (patch)
tree97ee1174488a5be1343c8f7eb58acbe385b8185d /src/satd.c
parent... (diff)
downloadsat-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.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/satd.c b/src/satd.c
index f69af3b..bd927cd 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -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