X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=21b4cf326bd49e48f0f2a1b2caeee34554578981;hb=bd39b88b61f8a17e1ca4c49706fe047d9253fb23;hp=c542179371327b951d71255902b949c789f265fd;hpb=d7ba13889c8692b14f99238ddf2721ed78df89d2;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index c54217937..21b4cf326 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2766,6 +2766,9 @@ static int create_ust_session(struct ltt_session *session, lus->live_timer_interval = session->live_timer; session->ust_session = lus; if (session->shm_path[0]) { + strncpy(lus->root_shm_path, session->shm_path, + sizeof(lus->root_shm_path)); + lus->root_shm_path[sizeof(lus->root_shm_path) - 1] = '\0'; strncpy(lus->shm_path, session->shm_path, sizeof(lus->shm_path)); lus->shm_path[sizeof(lus->shm_path) - 1] = '\0'; @@ -3249,6 +3252,20 @@ skip_domain: &cmd_ctx->lsm->u.channel.chan, kernel_poll_pipe[1]); break; } + case LTTNG_TRACK_PID: + { + ret = cmd_track_pid(cmd_ctx->session, + cmd_ctx->lsm->domain.type, + cmd_ctx->lsm->u.pid_tracker.pid); + break; + } + case LTTNG_UNTRACK_PID: + { + ret = cmd_untrack_pid(cmd_ctx->session, + cmd_ctx->lsm->domain.type, + cmd_ctx->lsm->u.pid_tracker.pid); + break; + } case LTTNG_ENABLE_EVENT: { struct lttng_event_exclusion *exclusion = NULL; @@ -4609,6 +4626,10 @@ static int set_option(int opt, const char *arg, const char *optname) } else { unsigned long v; + if (!arg) { + ret = -EINVAL; + goto end; + } errno = 0; v = strtoul(arg, NULL, 0); if (errno != 0 || !isdigit(arg[0])) {