]> git.lttng.org Git - lttng-ust.git/commit
Fix: fd tracker: provide async-signal-safety for close wrapper
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 4 Oct 2019 19:04:13 +0000 (15:04 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 7 Oct 2019 16:02:00 +0000 (12:02 -0400)
commit8ca5fb48f84862619c4b780beaf37b347494b372
tree68d24139c4ad5d52337b4b3da0d4516182669ba4
parentc8386296cd1005b6d1128655ae66f00a2f036df9
Fix: fd tracker: provide async-signal-safety for close wrapper

close(3) is part of the async-signal-safe functions. Therefore, it is
expected that the close wrapper provided by liblttng-ust-fd-tracker
behaves in a async-signal-safe way.

Use a similar strategy as ust_lock() does: disable signals when taking
and releasing the lock, and keep track of nesting with a TLS variable.
This ensures signals are restored to their original state when close(3)
ends up being invoked.

Fixes: #1199
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-comm/lttng-ust-fd-tracker.c
This page took 0.028336 seconds and 4 git commands to generate.