notification-thread: remove fd from pollset on LPOLLHUP and friends
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 26 May 2021 20:05:16 +0000 (16:05 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Mon, 12 Jul 2021 21:38:52 +0000 (17:38 -0400)
commit163f4ee3e311b2f782b6ef46c930980f443acb69
tree16478d387d3fd9a06c36a516e8421d5542681fb4
parentdf9542428e02e1b63ac8a023cda7164a68c8ef34
notification-thread: remove fd from pollset on LPOLLHUP and friends

When an app dies, it's possible that the notification thread gets an
epoll event (`LPOLLHUP`) that the socket was closed before it gets the
_REMOVE_TRACER_SOURCE command for that source.

In such cases, the notification thread should simply remove the file
descriptor from the pollset and drain the notification on that file
descriptor. It should _not_ remove the _source_element object from the
list.

The removal from the list should only be done when it receives the
_REMOVE_TRACER_SOURCE command.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9525315f9e92d0f6ae5e84e26b83a6b7207dce54
src/bin/lttng-sessiond/notification-thread-events.c
src/bin/lttng-sessiond/notification-thread-events.h
src/bin/lttng-sessiond/notification-thread.c
This page took 0.030516 seconds and 4 git commands to generate.