diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 00:39:41 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-28 00:39:41 +0100 |
commit | 22693dbc4841caf5177dea8658d86d4e93052286 (patch) | |
tree | edfdc5b6fe172ecce53cc30964fe3631a9fe5f1f | |
parent | doc (diff) | |
download | sat-22693dbc4841caf5177dea8658d86d4e93052286.tar.gz sat-22693dbc4841caf5177dea8658d86d4e93052286.tar.bz2 sat-22693dbc4841caf5177dea8658d86d4e93052286.tar.xz |
the socket shall be opened on fd 3 (you will see why later)
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r-- | src/satd.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -140,6 +140,10 @@ main(int argc, char *argv[]) t (foreground ? 0 : daemonise("satd", 0)); t (sock = create_socket(&address), sock == -1); + if (sock != 3) { + t (dup2(sock, 3) == -1); + close(sock), sock = 3; + } close(sock); unlink(address.sun_path); |