From: Nathan Bossart <nathandbossart@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Andy Fan <zhihuifan1213@163.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: convert libpgport's pqsignal() to a void function
Date: Wed, 15 Jan 2025 13:47:18 -0600
Message-ID: <Z4gQxiLQrf5OLf18@nathan> (raw)
In-Reply-To: <CA+hUKGL0NyB03uKrNqN0z1M=cwju_b_RJLgxtVPU4f0h8-8sZg@mail.gmail.com>
References: <Z4chOKfnthRH71mw@nathan>
<1164438.1736910166@sss.pgh.pa.us>
<Z4cyRX-hqfXREYKC@nathan>
<1171432.1736914085@sss.pgh.pa.us>
<Z4gJTtG4ZX9vXl-y@nathan>
<CA+hUKGL0NyB03uKrNqN0z1M=cwju_b_RJLgxtVPU4f0h8-8sZg@mail.gmail.com>
On Thu, Jan 16, 2025 at 08:21:08AM +1300, Thomas Munro wrote:
> On Thu, Jan 16, 2025 at 8:15 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> On Tue, Jan 14, 2025 at 11:08:05PM -0500, Tom Lane wrote:
>> > I wonder why we redefine those values?
>>
>> I wondered the same. Those redefines have been there since commit 5049196,
>> but I haven't been able to find any real discussion in the archives about
>> it. Maybe I will bug Magnus about it sometime, in case he happens to
>> remember the reason.
>
> My guess would be: perhaps some ancient version of MinGW didn't define
> them? They're defined by MinGW and native signal.h now and they have
> the same values, so we should remove them I think.
Okay. If nothing else, it'd be interesting to see what the buildfarm
thinks.
> Assertion failed: 0, file ../src/port/pqsignal.c, line 147
>
> Could be due to calling native signal() with a signal number other
> than the 6 values required to work by the C standard?
Looking closer, that probably makes more sense than my SIG_ERR redefinition
theory. If that assertion is getting hit, that means signal() _is_
returning SIG_ERR (either the system one or our redefined version), and it
looks like it's pretty common to use -1 for SIG_ERR. That'd only affect
Windows frontend programs, but it still sounds scary. I'll try getting
more details about the error with some custom cfbot runs.
--
nathan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us, masao.fujii@oss.nttdata.com, zhihuifan1213@163.com, pgsql-hackers@lists.postgresql.org
Subject: Re: convert libpgport's pqsignal() to a void function
In-Reply-To: <Z4gQxiLQrf5OLf18@nathan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox