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: 2023-11-29T03:16:52Z
Lists: pgsql-hackers
Attachments
On Tue, Nov 28, 2023 at 06:37:50PM -0800, Andres Freund wrote: > For a moment I was, wrongly, worried this would break signal handlers we > intentionally inherit from postmaster. It's fine though, because we block > signals in fork_process() until somewhere in InitPostmasterChild(), after > we've called InitProcessGlobals(). But perhaps that should be commented upon > somewhere? Good call. I expanded on the MyProcPid assertion in wrapper_handler() a bit. -- 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