PyObjCTools.MachSignals
– signal handling in a CFRunLoop¶
Substitute for the signal module when using a CFRunLoopRef
.
This module is generally only used to support PyObjCTools.AppHelper.installMachInterrupt()
.
A mach port is opened and registered to the Run Loop. When a signal occurs the signal number is sent in a mach message to the Run Loop. The handler then causes Python code to get executed.
This is equivalent to the signal
module, but that module
doesn’t work promptly when a program is blocked waiting on
a Run Loop.
- PyObjCTools.MachSignals.getsignal(signum)¶
Query the current signal handler for signum.
- PyObjCTools.MachSignals.signal(signum, handler)¶
Install a new signal handler for signum.