Re: convert libpgport's pqsignal() to a void function

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

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>, Andy Fan <zhihuifan1213@163.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-01-15T03:02:46Z
Lists: pgsql-hackers
Nathan Bossart <nathandbossart@gmail.com> writes:
> Thanks to commit 9a45a89, legacy-pqsignal.c now has its own dedicated
> extern for pqsignal(), which decouples it enough that we can follow through
> with changing libpqport's pqsignal() to a void function.

> Thoughts?

LGTM, although I don't know enough about Windows to know if the
"== SIG_ERR" test in that path is correct.

			regards, tom lane



Commits

  1. Remove redefinitions of SIG_* macros in win32_port.h.

  2. Convert libpgport's pqsignal() to a void function.

  3. Avoid calling pqsignal() with invalid signals on Windows frontends.

  4. Avoid symbol collisions between pqsignal.c and legacy-pqsignal.c.

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

  6. Further refactoring of c.h and nearby files.

  7. Here's the latest win32 signals code, this time in the form of a patch

  8. Add C version of initdb, from Andrew Dunstan.

  9. Allow Win32 to compile under MinGW. Major changes are: