Re: [small patch] Change datatype of ParallelMessagePending from "volatile bool" to "volatile sig_atomic_t"

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-09-28T01:23:11Z
Lists: pgsql-hackers
On Tue, Sep 27, 2022 at 01:38:26AM +0000, kuroda.hayato@fujitsu.com wrote:
> Maybe you mentioned about sigint_interrupt_enabled,
> and it also seems to be modified in the signal handler.

Yeah, at least as of the cancel callback psql_cancel_callback() that
handle_sigint() would call on SIGINT as this is set by psql.  So it
does not seem right to use a boolean rather than a sig_atomic_t in
this case, as well.
--
Michael

Commits

  1. Mark sigint_interrupt_enabled as sig_atomic_t

  2. Mark ParallelMessagePending as sig_atomic_t