#include <unistd.h>
#include <urcu/list.h> /* URCU list library (-lurcu) */
-#include <ust/ustctl.h> /* UST control lib (-lust) */
#include <lttng/lttng.h>
#include "liblttsessiondcomm.h"
#include "session.h"
#include "traceable-app.h"
#include "lttng-kconsumerd.h"
+#include "libustctl.h"
/*
* TODO:
sock = ustctl_connect_pid(lta->pid);
if (sock < 0) {
- ERR("Fail connecting to the PID %d\n", pid);
+ ERR("Fail connecting to the PID %d", pid);
}
return sock;
// TODO: recursive create dir
ret = mkdir(chan->pathname, S_IRWXU | S_IRWXG );
if (ret < 0) {
- perror("mkdir trace path");
- ret = -errno;
- goto error;
+ if (ret != EEXIST) {
+ perror("mkdir trace path");
+ ret = -errno;
+ goto error;
+ }
}
}
ret = mkdir(KCONSUMERD_PATH, S_IRWXU | S_IRWXG);
if (ret < 0) {
- ERR("Failed to create " KCONSUMERD_PATH);
- goto error;
+ if (errno != EEXIST) {
+ ERR("Failed to create " KCONSUMERD_PATH);
+ goto error;
+ }
+ ret = 0;
}
/* Create the kconsumerd error unix socket */