Closed jwp closed 14 years ago
the atexit module exposes the ability to call and clear the exit functions, so we'll just setup the on_proc_exit hook and use the standard atexit module.
Done. Introduces a new pl state: pl_terminated. Probably use this more in the future upon detection of corrupt state(unexpected longjmp's worry me).
http://github.com/jwp/pg-python/commit/45763700de80ded0bb6be25ff640f89f608e8f12
This may be a bit fragile as it relies on undocumented atexit APIs, but by using them we get to avoid creating an overriding atexit module.
Use this to support some atexit facilities. (plperl threads on hackers can be very educational)