[Python-Dev] Need to hook Py_FatalError
M.Utku K.
m.u.k.2 at gawab.com
Wed May 4 17:29:33 CEST 2005
James William Pye <python at jwp.name> wrote in
news:1115218734.62180.119.camel at localhost:
> On Wed, 2005-05-04 at 09:46 +0000, M.Utku K. wrote:
>> The reinit. issue: The old way of returning old callback when a new
>> callback is set sounds OK. Or better way: there may be an array to hold
>> all the callbacks, Py_FatalError iterates and call each.
>
> Why should reinitialization be allowed at all? Seems to me that this
> feature should be exclusively reserved for an embedding application to
> handle the fatal in an application specific way; ie ereport(FATAL,()) in
> PostgreSQL, which quickly exits after some cleanup. Why should an
> extension module be allowed to set this, or reset it?
What if more than one extension needs it ?
Curently Im doing
callback_type SetCallBack(callback_type newfunc)
This will set the callback to newfunc and return the old one. Extension
developer may discard or call them at his own will. What do you think?
More information about the Python-Dev
mailing list