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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(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 19:21:08
Message-ID: CA+hUKGL0NyB03uKrNqN0z1M=cwju_b_RJLgxtVPU4f0h8-8sZg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 16, 2025 at 8:15 AM Nathan Bossart <nathandbossart(at)gmail(dot)com> wrote:
> On Tue, Jan 14, 2025 at 11:08:05PM -0500, Tom Lane wrote:
> > Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
> >> My guess is that this has something to do with redefining SIG_ERR in
> >> win32_port.h. We might be able to use push_macro/pop_macro to keep the old
> >> value around, but at the moment I'm leaning towards just removing the
> >> assertion in that path.
> >
> > 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.

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?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marcos Pegoraro 2025-01-15 19:35:52 Re: Eagerly scan all-visible pages to amortize aggressive vacuum
Previous Message Peter Eisentraut 2025-01-15 19:21:04 Re: IWYU annotations