Fix already exist lttng rundir error
authorDavid Goulet <david.goulet@polymtl.ca>
Wed, 1 Jun 2011 21:14:34 +0000 (17:14 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Wed, 1 Jun 2011 21:14:34 +0000 (17:14 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/main.c

index bae3f27458eb0b09c41ae788876682644c523a03..30b0edd0e75f6d6e46272fa9b98b807495c6c2ac 100644 (file)
@@ -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:
This page took 0.028242 seconds and 4 git commands to generate.