From: David Goulet Date: Thu, 28 Apr 2011 14:49:40 +0000 (-0400) Subject: Fix cleanup bug X-Git-Tag: v2.0-pre1~173 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=ab118b20ff2792be71690fdbf265ad6c691a2825;p=lttng-tools.git Fix cleanup bug If the daemon was already running, a cleanup occured making the two unix sockets being unlinked. Signed-off-by: David Goulet --- 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) {