Install an atexit(2) callback that ensures that proc_exit's cleanup processing

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 249a899f73b88061809547f24284d54edba52698
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-05-05T20:06:07Z
Releases: 8.4.0
Install an atexit(2) callback that ensures that proc_exit's cleanup processing
will still be performed if something in a backend process calls exit()
directly, instead of going through proc_exit() as we prefer.  This is a second
response to the issue that we might load third-party code that doesn't know it
should not call exit().  Such a call will now cause a reasonably graceful
backend shutdown, if possible.  (Of course, if the reason for the exit() call
is out-of-memory or some such, we might not be able to recover, but at least
we will try.)

Files

PathChange+/−
src/backend/storage/ipc/ipc.c modified +123 −40