X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttng-ustconsumer%2Flttng-ustconsumer.c;h=db0ba05bd6a160c691b77eff6fe8808a2032dd45;hp=951ef78812e3661980bc95b7a3b31674969146e5;hb=5485f82241185e6703fe343704c48d2a6d6a4b46;hpb=1316184615e422526ef4fae68f980443414969c1 diff --git a/liblttng-ustconsumer/lttng-ustconsumer.c b/liblttng-ustconsumer/lttng-ustconsumer.c index 951ef7881..db0ba05bd 100644 --- a/liblttng-ustconsumer/lttng-ustconsumer.c +++ b/liblttng-ustconsumer/lttng-ustconsumer.c @@ -29,9 +29,9 @@ #include #include -#include #include #include +#include #include extern struct lttng_consumer_global_data consumer_data; @@ -271,6 +271,12 @@ int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan) if (!chan->handle) { return -ENOMEM; } + /* + * The channel fds are passed to ustctl, we only keep a copy. + */ + chan->shm_fd_is_copy = 1; + chan->wait_fd_is_copy = 1; + return 0; } @@ -298,6 +304,12 @@ int lttng_ustconsumer_allocate_stream(struct lttng_consumer_stream *stream) if (!stream->mmap_base) { return -EINVAL; } + /* + * The stream fds are passed to ustctl, we only keep a copy. + */ + stream->shm_fd_is_copy = 1; + stream->wait_fd_is_copy = 1; + return 0; }