Back-patch assorted latch-related fixes.

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

Commit: 989f530d3f793ed1c990d705d0958bfd2a533b85
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-08-10T16:20:45Z
Releases: 9.1.0
Back-patch assorted latch-related fixes.

Fix a whole bunch of signal handlers that had been hacked to do things that
might change errno, without adding the necessary save/restore logic for
errno.  Also make some minor fixes in unix_latch.c, and clean up bizarre
and unsafe scheme for disowning the process's latch.  While at it, rename
the PGPROC latch field to procLatch for consistency with 9.2.

Issues noted while reviewing a patch by Peter Geoghegan.

Files