Re: stopgap fix for signal handling during restore_command

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Nathan Bossart <nathandbossart@gmail.com>, Andres Freund <andres@anarazel.de>
Cc: Thomas Munro <thomas.munro@gmail.com>, Michael Paquier <michael@paquier.xyz>, Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Fujii Masao <fujii@postgresql.org>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-10-01T18:50:15Z
Lists: pgsql-hackers
On 22.04.23 01:07, Nathan Bossart wrote:
> On Wed, Mar 01, 2023 at 03:13:04PM -0800, Andres Freund wrote:
>> On 2023-03-01 14:47:51 -0800, Nathan Bossart wrote:
>>> Here is an attempt at adding a signal safe function for writing to STDERR.
>>
>> Cool.
> 
> I'm gently bumping this thread to see if anyone had additional feedback on
> the proposed patches [0].  The intent was to back-patch these as needed and
> to pursue a long-term fix in v17.  Are there any concerns with that?
> 
> [0] https://postgr.es/m/20230301224751.GA1823946%40nathanxps13

Is this still being contemplated?  What is the status of this?



Commits

  1. windows: msvc: Define STDIN/OUT/ERR_FILENO.

  2. Avoid calling proc_exit() in processes forked by system().

  3. Move extra code out of the Pre/PostRestoreCommand() section.