X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=liblttng-ustconsumer%2Flttng-ustconsumer.c;fp=liblttng-ustconsumer%2Flttng-ustconsumer.c;h=db0ba05bd6a160c691b77eff6fe8808a2032dd45;hp=bf3ae08452f9371afc08393b6ba56c4f71e1c541;hb=b5c5fc2947ec79834e054e0117414b717faeee4d;hpb=ee77a7b0829d9976d3a899cfc9847f83e042ecc9 diff --git a/liblttng-ustconsumer/lttng-ustconsumer.c b/liblttng-ustconsumer/lttng-ustconsumer.c index bf3ae0845..db0ba05bd 100644 --- a/liblttng-ustconsumer/lttng-ustconsumer.c +++ b/liblttng-ustconsumer/lttng-ustconsumer.c @@ -272,11 +272,11 @@ int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan) return -ENOMEM; } /* - * The channel shm and wait fds are passed to ustctl, set them - * to -1 here. + * The channel fds are passed to ustctl, we only keep a copy. */ - chan->shm_fd = -1; - chan->wait_fd = -1; + chan->shm_fd_is_copy = 1; + chan->wait_fd_is_copy = 1; + return 0; } @@ -305,11 +305,10 @@ int lttng_ustconsumer_allocate_stream(struct lttng_consumer_stream *stream) return -EINVAL; } /* - * The stream shm and wait fds are passed to ustctl, set them to - * -1 here. + * The stream fds are passed to ustctl, we only keep a copy. */ - stream->shm_fd = -1; - stream->wait_fd = -1; + stream->shm_fd_is_copy = 1; + stream->wait_fd_is_copy = 1; return 0; }