projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ust consumer: fix double close
[lttng-tools.git]
/
liblttng-ustconsumer
/
lttng-ustconsumer.c
diff --git
a/liblttng-ustconsumer/lttng-ustconsumer.c
b/liblttng-ustconsumer/lttng-ustconsumer.c
index 3c81c32e7d6ca4db5590ca72fd2d8fd65136f8aa..bf3ae08452f9371afc08393b6ba56c4f71e1c541 100644
(file)
--- a/
liblttng-ustconsumer/lttng-ustconsumer.c
+++ b/
liblttng-ustconsumer/lttng-ustconsumer.c
@@
-271,6
+271,12
@@
int lttng_ustconsumer_allocate_channel(struct lttng_consumer_channel *chan)
if (!chan->handle) {
return -ENOMEM;
}
if (!chan->handle) {
return -ENOMEM;
}
+ /*
+ * The channel shm and wait fds are passed to ustctl, set them
+ * to -1 here.
+ */
+ chan->shm_fd = -1;
+ chan->wait_fd = -1;
return 0;
}
return 0;
}
@@
-298,6
+304,13
@@
int lttng_ustconsumer_allocate_stream(struct lttng_consumer_stream *stream)
if (!stream->mmap_base) {
return -EINVAL;
}
if (!stream->mmap_base) {
return -EINVAL;
}
+ /*
+ * The stream shm and wait fds are passed to ustctl, set them to
+ * -1 here.
+ */
+ stream->shm_fd = -1;
+ stream->wait_fd = -1;
+
return 0;
}
return 0;
}
This page took
0.023012 seconds
and
4
git commands to generate.