Re: common signal handler protection

Noah Misch <noah@leadboat.com>

From: Noah Misch <noah@leadboat.com>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org
Date: 2024-02-14T19:55:43Z
Lists: pgsql-hackers
On Mon, Dec 18, 2023 at 11:32:47AM -0600, Nathan Bossart wrote:
> rebased for cfbot

I took a look over each of these.  +1 for all.  Thank you.



Commits

  1. Remove obsolete check in SIGTERM handler for the startup process.

  2. Centralize logic for restoring errno in signal handlers.

  3. Check that MyProcPid == getpid() in backend signal handlers.

  4. Avoid calling proc_exit() in processes forked by system().