Re: Clean up some signal usage mainly related to Windows

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Tristan Partin <tristan@neon.tech>, pgsql-hackers@postgresql.org
Date: 2023-07-12T08:56:13Z
Lists: pgsql-hackers
On 06.07.23 22:43, Tristan Partin wrote:
>   	/* Finish incomplete line on stdout */
> -	puts("");
> -	exit(1);
> +	write(STDOUT_FILENO, "", 1);
> +	_exit(1);

puts() writes a newline, so it should probably be something like

     write(STDOUT_FILENO, "\n", 1);




Commits

  1. Suppress -Wunused-result warning about write().

  2. Use signal-safe functions in signal handler