On Mon, 4 Dec 2000, Christian Robottom Reis wrote:

> 
> James, I'm wondering if and how you've solved the issue of Python signal
> handlers not being serviced during C calls (as in gtk_main()) - I've run
> into this problem with orbit-python now, since ORB_run() never returns,
> and I wonder if you know of a decent solution.
> 
> I've tried rewriting a handler to get PyErr_CheckSignals() but it (of
> course) won't call the python handler since I've killed the signal_handler
> stub; PyOS_getsig could be used for this, perhaps, but it's Python 2.0
> only. Python's Handlers struct is opaque and so I can't mark the signal as
> triggered, so now I'm left wondering how this could be done otherwise.
> 
> I've tried going through pygtk code but haven't really found anywhere you
> do this, so if you can give me a hand I'd be most grateful. Perhaps there
> is no decent solution; in this case I'll just strap on the python default
> handlers (or a lookalike) for SIGINT and perhaps HUP and let it be. It's
> not nice, however.
> 
> There could, of course, be a good reason why we're not allowed to do
> interrupting signal handling with the C code.. context clobbering comes 
> to mind, but I'm just so ignorant it hurts :-) 

I don't handle signals properly in pygtk at the moment.  The correct
solution to get the signals handled is to make sure
Py_MakePendingCalls() is called regularly.  This could be done through an
idle or timeout handler in the case of pygtk.

I am not sure how to get CORBA.ORB.run() to do a similar thing though.

James.


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to