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

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Andy Fan <zhihuifan1213(at)163(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: convert libpgport's pqsignal() to a void function
Date: 2025-01-15 23:47:51
Message-ID: Z4hJJwITseaKq_81@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 16, 2025 at 11:07:41AM +1300, Thomas Munro wrote:
> +1 for your idea of not defining them at all outside the backend, it's
> just confusing noise.

I tried that, but these extra signals are needed even in the frontend for
pgkill(), etc. My next thought was to simply ignore signal() errors for
the extra signals, but I don't think that's very nice because it just masks
broken code. Finally, I settled on modifying initdb's setup_signals() to
use WIN32 checks instead of checking for the signals themselves. This is
how it's done elsewhere, and this is apparently all that's needed to make
cfbot's Windows run happy.

I've also attached a 0002 that removes the redefinitions of SIG_ERR and
friends. That looks good on cfbot, but we'll see what the buildfarm has to
say...

--
nathan

Attachment Content-Type Size
v4-0001-Convert-libpgport-s-pqsignal-to-a-void-function.patch text/plain 5.1 KB
v4-0002-Remove-redeclarations-of-signal-functions-on-Wind.patch text/plain 844 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-01-16 00:42:09 Re: [PATCH] Hex-coding optimizations using SVE on ARM.
Previous Message Peter Smith 2025-01-15 23:22:39 Re: Adding a '--two-phase' option to 'pg_createsubscriber' utility.