From 0c2e1cf507f1d386f31aa9dd56797c35c5e24aa1 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 28 Dec 2015 15:28:29 +0100 Subject: satd: exec to an image without init text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/satd.c') 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) -- cgit v1.2.3-70-g09d2