Quantcast

PyObjC and signal handling

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

PyObjC and signal handling

Vinay Sajip
How does PyObjC deal with signals received by an application? If I run a
windowed PyObjC application, I can't interrupt it with Ctrl-C (this is on
Leopard). I know this is no big deal, since I can always use Cmd-., but there
are instances where a signal might be sent programmatically to a process. In
such cases, a Python-installed signal handler would not be invoked if the
application is inside C code waiting for events, until it returns from C back to
Python code - potentially a long delay if no other events arrive for a while.

There appears to be code in the PyObjC codebase to deal with it (e.g.
installMachInterrupt) but I can't see how it gets called. It appears to use a
C-level library called _machsignals, which I can't find on the system. Is this
particular functionality in PyObjC no longer used?

Thanks for any pointers,

Vinay Sajip

_______________________________________________
Pythonmac-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Loading...