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:45 +0000 (12:02 -0400)
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>

No differences found
This page took 0.024568 seconds and 4 git commands to generate.