aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 17:12:34 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 17:12:34 +0100
commitfc88512b5e985fc26ba4fb92b6b0bb19723524a3 (patch)
tree64412c7be3d381117b21c4caba294ceabbbc39a0 /src/satd.c
parentthat is why I used MSG_PEEK initially (diff)
downloadsat-fc88512b5e985fc26ba4fb92b6b0bb19723524a3.tar.gz
sat-fc88512b5e985fc26ba4fb92b6b0bb19723524a3.tar.bz2
sat-fc88512b5e985fc26ba4fb92b6b0bb19723524a3.tar.xz
support recovering from a crash
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd.c')
-rw-r--r--src/satd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/satd.c b/src/satd.c
index f69af3b..40e04ac 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -263,6 +263,8 @@ main(int argc, char *argv[])
/* Daemonise. */
t (foreground ? 0 : daemonise("satd", DAEMONISE_KEEP_FDS, sock, -1));
+ if (foreground)
+ close(5); /* Required to be closed by the next image. */
/* Change to a process image without all this initialisation text. */
execl(LIBEXEC "/" PACKAGE "/satd-diminished", argv0,