Il 15/06/20 18:12, Thiago Macieira ha scritto:
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.
It's very unfortunate that signalfd wants to read a pending signal, rather than being a "special" signal handler that overrides the dispositions. You may get away with installing it before spawning any other thread. But then again, threads+signals+libraries don't exactly mix well together...
-- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com KDAB - The Qt, C++ and OpenGL Experts
smime.p7s
Description: Firma crittografica S/MIME
_______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest