[Interest] Connecting signal handler to Qt application - async-handler-safety
Thiago Macieira
thiago.macieira at intel.com
Mon Jun 15 18:12:21 CEST 2020
On segunda-feira, 15 de junho de 2020 04:06:28 PDT Giuseppe D'Angelo via
Interest wrote:
> On Linux you can also use signalfd(2) to achieve the same without the
> burden of a custom signal handler.
No, you can't, because you need to block the signal using pthread_sigmask in
all threads, otherwise the kernel may prefer delivering the signal instead of
using the signalfd. Qt has a few background threads (like the QHostInfo thread
pool) that you don't have access to.
signalfd is a misfeature. Don't use it.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel System Software Products
More information about the Interest
mailing list