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: flag shm/wait fd as copy
[lttng-tools.git]
/
liblttng-consumer
/
lttng-consumer.c
diff --git
a/liblttng-consumer/lttng-consumer.c
b/liblttng-consumer/lttng-consumer.c
index 081d6142b2d76505f3f4de4520654380d3c220cc..5311860e01ac3d5c145991c194d3f3a32060d96f 100644
(file)
--- a/
liblttng-consumer/lttng-consumer.c
+++ b/
liblttng-consumer/lttng-consumer.c
@@
-125,10
+125,11
@@
void consumer_del_stream(struct lttng_consumer_stream *stream)
if (stream->out_fd >= 0) {
close(stream->out_fd);
}
if (stream->out_fd >= 0) {
close(stream->out_fd);
}
- if (stream->wait_fd >= 0) {
+ if (stream->wait_fd >= 0
&& !stream->wait_fd_is_copy
) {
close(stream->wait_fd);
}
close(stream->wait_fd);
}
- if (stream->shm_fd >= 0 && stream->wait_fd != stream->shm_fd) {
+ if (stream->shm_fd >= 0 && stream->wait_fd != stream->shm_fd
+ && !stream->shm_fd_is_copy) {
close(stream->shm_fd);
}
if (!--stream->chan->refcount)
close(stream->shm_fd);
}
if (!--stream->chan->refcount)
@@
-282,10
+283,11
@@
void consumer_del_channel(struct lttng_consumer_channel *channel)
perror("munmap");
}
}
perror("munmap");
}
}
- if (channel->wait_fd >= 0) {
+ if (channel->wait_fd >= 0
&& !channel->wait_fd_is_copy
) {
close(channel->wait_fd);
}
close(channel->wait_fd);
}
- if (channel->shm_fd >= 0 && channel->wait_fd != channel->shm_fd) {
+ if (channel->shm_fd >= 0 && channel->wait_fd != channel->shm_fd
+ && !channel->shm_fd_is_copy) {
close(channel->shm_fd);
}
free(channel);
close(channel->shm_fd);
}
free(channel);
This page took
0.025652 seconds
and
5
git commands to generate.