tracers/leaks: fix reentrancy issues with the custom signal handlers
authorMatthew Waters <matthew@centricular.com>
Thu, 1 Sep 2016 07:33:13 +0000 (17:33 +1000)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 9 Jun 2020 12:36:18 +0000 (12:36 +0000)
commit15761c93c2d294a718cd677964ebce745ecb47e2
treebad84ce940bd3987daa93f88baf3e81b3cf8116f
parent0b0a120a3711202334bcf6e35e849e529e832465
tracers/leaks: fix reentrancy issues with the custom signal handlers

The signal handlers were performing mutex operations in the signal handlers
which is bad idea that may lead to deadlocks.

1. Implement a separate signal thread to handle the signals.
2. Use the glib provided signal GSource to avoid performing operations in
   the signal handler.

Fix #186

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/487>
plugins/tracers/gstleaks.c