Re: [Orbit-python-list] Catching SIGINT inside orb.run()
Status: Inactive
Brought to you by:
tack
From: Jason T. <ta...@li...> - 2000-11-30 14:54:57
|
> The process keeps on running. So some handlers are actually called - just > user-defined ones aren't. I don't know if this is because we're using > CORBA's default handlers. I assume this is because of the global interpreter lock. When the process receives a signal that was set by the signal module, it enters the Python stub function to call the custom handler back in Python space, but it blocks until the interpreter lock is released which won't happen until some CORBA event occurs. 'course I could be wrong, but it makes sense. :) > What call do I have to produce to get the interpreter to handle signal > requests? I've managed to implement a dummy handler here that does what I > want, but how to I let python handle the events? It looks like the approach would be to release the interpreter lock and call PyErr_CheckSignals(), and then reestablish the lock. (Look at operation_skel() in server.c on how to restore/save the lock). Jason. |