Re: common signal handler protection
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@postgresql.org, noah@leadboat.com
Date: 2024-02-07T17:15:54Z
Lists: pgsql-hackers
Sorry for the noise. On Wed, Feb 07, 2024 at 11:06:50AM -0600, Nathan Bossart wrote: > I'd like to get this committed (to HEAD only) in the next few weeks. TBH > I'm not wild about the weird caveats (e.g., race conditions when pqsignal() > is called within a signal handler), but I also think it is unlikely that > they cause any issues in practice. Please do let me know if you have any > concerns about this. Perhaps we should add a file global bool that is only set during wrapper_handler(). Then we could Assert() or elog(ERROR, ...) if pqsignal() is called with it set. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Remove obsolete check in SIGTERM handler for the startup process.
- 8fd0498de200 17.0 landed
-
Centralize logic for restoring errno in signal handlers.
- 28e46325091d 17.0 landed
-
Check that MyProcPid == getpid() in backend signal handlers.
- 3b00fdba9f20 17.0 landed
-
Avoid calling proc_exit() in processes forked by system().
- 97550c071197 17.0 cited