Ticket #430 (closed defect: invalid)
Threaded mainloop API steals signals unnecessarily
| Reported by: | jcornwall | Owned by: | lennart |
|---|---|---|---|
| Milestone: | Component: | libpulse | |
| Keywords: | Cc: |
Description
The following code in src/pulse/threaded-mainloop.c:
/* Make sure that signals are delivered to the main thread */ sigfillset(&mask); pthread_sigmask(SIG_BLOCK, &mask, NULL);
Interferes badly with client applications that use signals for other purposes, including the Mono runtime environment. This functionality is only needed when pa_signal_init() has been called but is indiscriminately applied to all clients, when only a fraction will use this feature.
Attached is a patch to conditionally run this code when pa_signal_init() has been called. Because mainloop-signal.c is API-agnostic wiring the two together is tricky, so I opted to add an internal (exposed but not exported) API-agnostic function to act as a buffer. The patched library works with signal-dependent applications and does not alter functionality in other applications where pa_signal_init() is called, as it must before using signalling features.
