From ab118b20ff2792be71690fdbf265ad6c691a2825 Mon Sep 17 00:00:00 2001 From: David Goulet Date: Thu, 28 Apr 2011 10:49:40 -0400 Subject: [PATCH] Fix cleanup bug If the daemon was already running, a cleanup occured making the two unix sockets being unlinked. Signed-off-by: David Goulet --- ltt-sessiond/ltt-sessiond.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltt-sessiond/ltt-sessiond.c b/ltt-sessiond/ltt-sessiond.c index 9c33ff9ec..839c5204d 100644 --- a/ltt-sessiond/ltt-sessiond.c +++ b/ltt-sessiond/ltt-sessiond.c @@ -1136,7 +1136,10 @@ int main(int argc, char **argv) */ if ((ret = check_existing_daemon()) == 0) { ERR("Already running daemon.\n"); - goto error; + /* We do not goto error because we must not + * cleanup() because a daemon is already working. + */ + return EXIT_FAILURE; } if (set_signal_handler() < 0) { -- 2.34.1