aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-28 15:28:29 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-28 15:28:29 +0100
commit0c2e1cf507f1d386f31aa9dd56797c35c5e24aa1 (patch)
tree9e57e894bcc7c73eae78c2a35c68fe4bdfe018a4 /src/satd.c
parentm (diff)
downloadsat-0c2e1cf507f1d386f31aa9dd56797c35c5e24aa1.tar.gz
sat-0c2e1cf507f1d386f31aa9dd56797c35c5e24aa1.tar.bz2
sat-0c2e1cf507f1d386f31aa9dd56797c35c5e24aa1.tar.xz
satd: exec to an image without init text
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd.c')
-rw-r--r--src/satd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/satd.c b/src/satd.c
index 74b190f..a5b09ff 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -218,10 +218,9 @@ main(int argc, char *argv[])
/* Daemonise. */
t (foreground ? 0 : daemonise("satd", DAEMONISE_KEEP_FDS, sock, -1));
- close(sock);
- unlink(address.sun_path);
- undaemonise();
- return 0;
+ /* Change to a process image without all this initialisation text. */
+ execl(LIBEXEC "/" PACKAGE "/satd-diminished", argv0,
+ address.sun_path, getenv("SAT_HOOK_PATH"), NULL);
fail:
if (errno)