[Interest] Connecting signal handler to Qt application - async-handler-safety

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Mon Jun 15 13:06:28 CEST 2020


Il 15/06/20 12:58, Bernhard Lindner ha scritto:
> 
> Are there any functions in Qt that are considered async-handler-safe?

No, as any of them may allocate memory.

See https://doc.qt.io/qt-5/unix-signals.html for the textbook solution 
(self pipe trick).

On Linux you can also use signalfd(2) to achieve the same without the 
burden of a custom signal handler.

HTH,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200615/27bee62d/attachment.bin>


More information about the Interest mailing list