From: Mathieu Desnoyers Date: Fri, 4 Oct 2019 19:04:13 +0000 (-0400) Subject: Fix: fd tracker: provide async-signal-safety for close wrapper X-Git-Tag: v2.11.0-rc5~4 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=8ca5fb48f84862619c4b780beaf37b347494b372;hp=8ca5fb48f84862619c4b780beaf37b347494b372;p=lttng-ust.git 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 ---