From: Mathieu Desnoyers Date: Wed, 16 Nov 2011 01:24:41 +0000 (-0500) Subject: Fix multi-session UST handling combined with shm fd teardown X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=7ad0a0cb283d4004cf9274df8eec4e3530864fc7;hp=7ad0a0cb283d4004cf9274df8eec4e3530864fc7;p=lttng-tools.git Fix multi-session UST handling combined with shm fd teardown shm fd is used as unique identifier for the channel when passing the stream fds to the consumer. However, closing the fd reuses the same identifier for the next round, thus getting the same consumer channel/streams as the previous one. This causes multi-session tracing to only work for the first session, not the following ones. So instead of doing a channel lookup on add channel and a stream lookup upon add stream, we "steal" the identifier. We still lookup the channel identifier upon stream add though: this means the sessiond needs to keep the channel shm fd open until it has finished sending all stream fds to the consumer. For kernel consumer, the update operation still does a stream id lookup. Signed-off-by: Mathieu Desnoyers ---