[PyQt] How to handle unix signals in PyQt

Bobby R. Ward bobbyrward at gmail.com
Wed Jan 28 01:20:21 GMT 2009


I can't figure out how to handle unix signals in PyQt.

If I try to connect to the unixSignal signal of QCoreApplication,  nothing
happens.  I've noticed that the C++ examples call *watchUnixSignal*(signal_num,
true) but this isn't exposed in PyQt.

If I try to use python's standard signal handlers with PyQt I run into some
odd situations.  If I comment out the creation of the QCoreApplication the
signal is trapped and everything works.  If I  create the QCoreApplication,
it seems the signal is trapped and ignored by PyQt.

I am not even able to use SIGINT to stop the application and I'm forced to
use kill to quit the program.

How am I supposed to handle this?

-- 
Bobby R. Ward
------------------------------
bobbyrward at gmail.com
https://launchpad.net/~bobbyrward
http://combustion.sourceforge.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20090128/6d0f0125/attachment.html


More information about the PyQt mailing list