From: David Goulet Date: Wed, 1 Jun 2011 21:14:34 +0000 (-0400) Subject: Fix already exist lttng rundir error X-Git-Tag: v2.0-pre1~94 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b1f11e69d7782029847845f0a5d018733c15a2f0;p=lttng-tools.git Fix already exist lttng rundir error Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index bae3f2745..30b0edd0e 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -1411,8 +1411,12 @@ static int create_lttng_rundir(void) ret = mkdir(LTTNG_RUNDIR, S_IRWXU | S_IRWXG ); if (ret < 0) { - ERR("Unable to create " LTTNG_RUNDIR); - goto error; + if (errno != EEXIST) { + ERR("Unable to create " LTTNG_RUNDIR); + goto error; + } else { + ret = 0; + } } error: