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:00:47 +0000 (12:00 -0400)
commit96a6162e1925d4bd1dfc6f4167d75f396c0dbe4c
treecb18a292ca5699ca329cde721888898b251852ae
parent283f4bec47781f7a39dde82d02e53add02155f9c
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.024643 seconds and 4 git commands to generate.