Install an atexit(2) callback that ensures that proc_exit's cleanup processing
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 May 2009 20:06:07 +0000 (20:06 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 5 May 2009 20:06:07 +0000 (20:06 +0000)
commitc263edea3cac054d03fd2d0f17cef6ea7bd07348
treefd0cdb0d1189a1702528d48035735d910c028f87
parent17df03d5134eee2c70593ce963ac4346d3e365b7
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.)
src/backend/storage/ipc/ipc.c