[poppler] [PATCH] Fix handling of SIGINT in multithreaded regression tests

Adam Reichold adam.reichold at t-online.de
Wed Dec 30 02:38:23 PST 2015


Hello,

The Python-based regtest framework currently faces a common problem of
multi-threaded Python programs: An non-timed join will block signals
like SIGINT, so that it becomes impossible to stop the program by
pressing Control + C or sending SIGINT.

However, since the threading in regtest is simple enough, there seems to
be a useful trick, i.e. using a separate terminator thread on which a
non-timed join is forwarded using a timed join. This way, sending SIGINT
will kill all daemon threads (including the terminator thread) and
interrupt the main thread. Since all our worker threads are daemon
threads and we need not particularly care about clean-up, the attached
patch should suffice to fix SIGINT for us.

Best regards, Adam.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regtest-threading-sigint.patch
Type: text/x-patch
Size: 5473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20151230/592d0dac/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20151230/592d0dac/attachment.sig>


More information about the poppler mailing list