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

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <masao.fujii@oss.nttdata.com>, Andy Fan <zhihuifan1213@163.com>, pgsql-hackers@lists.postgresql.org
Date: 2025-01-17T03:03:43Z
Lists: pgsql-hackers
I've now committed all of this.  I ended up finding a couple other frontend
programs that called pqsignal() with an invalid signal number on Windows,
so I fixed those as well.  AFAICT the reason I didn't catch them in my
earlier testing is because they aren't tested!  I'll keep an eye on the
buildfarm for any problems with the SIG_* redefinition removal, too.

Thanks for reviewing and for sharing lots of context about this stuff.

-- 
nathan



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: