X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=ltt-sessiond%2Fmain.c;h=edeb86d29d5b168b795af6869ef5dce86811971a;hb=271933a4d7438f73f1487842bb18b2442ceaec48;hp=7532e2c3bdde96e18c6d82772bf2b9ae3fbb146c;hpb=7a3d132871a4414b6cd232e7f41e6a1f50d9bf16;p=lttng-tools.git diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index 7532e2c3b..edeb86d29 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -701,6 +701,12 @@ static void *thread_manage_kernel(void *data) while (1) { if (update_poll_flag == 1) { + /* + * Reset number of fd in the poll set. Always 2 since there is the thread + * quit pipe and the kernel pipe. + */ + events.nb_fd = 2; + ret = update_kernel_poll(&events); if (ret < 0) { goto error; @@ -1432,12 +1438,13 @@ static int mount_debugfs(char *path) ret = mkdir_recursive(path, S_IRWXU | S_IRWXG, geteuid(), getegid()); if (ret < 0) { + PERROR("Cannot create debugfs path"); goto error; } ret = mount(type, path, type, 0, NULL); if (ret < 0) { - perror("mount debugfs"); + PERROR("Cannot mount debugfs"); goto error; } @@ -1487,6 +1494,7 @@ static void init_kernel_tracer(void) } ret = mount_debugfs(debugfs_path); if (ret < 0) { + perror("Cannot mount debugfs"); goto error; } } @@ -2304,7 +2312,7 @@ static int cmd_destroy_session(struct ltt_session *session, char *name) perror("write kernel poll pipe"); } - ret = session_destroy(name); + ret = session_destroy(session); return ret; }