Re: Clean up some signal usage mainly related to Windows

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Clean up some signal usage mainly related to Windows
Дата
Msg-id abb2c1d4-a3fa-4fff-8500-480277522eb1@eisentraut.org
обсуждение исходный текст
Ответ на Re: Clean up some signal usage mainly related to Windows  ("Tristan Partin" <tristan@neon.tech>)
Ответы Re: Clean up some signal usage mainly related to Windows  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On 04.12.23 18:20, Tristan Partin wrote:
> On Mon Dec 4, 2023 at 9:22 AM CST, Peter Eisentraut wrote:
>> On 01.12.23 23:10, Tristan Partin wrote:
>> > On Wed Jul 12, 2023 at 9:35 AM CDT, Tristan Partin wrote:
>> >> On Wed Jul 12, 2023 at 9:31 AM CDT, Peter Eisentraut wrote:
>> >> > On 12.07.23 16:23, Tristan Partin wrote:
>> >> > > It has come to my attention that STDOUT_FILENO might not be >> 
>> portable and
>> >> > > fileno(3) isn't marked as signal-safe, so I have just used the 
>> raw >> 1 for
>> >> > > stdout, which as far as I know is portable.
>> >> >
>> >> > We do use STDOUT_FILENO elsewhere in the code, and there are even 
>> > >> workaround definitions for Windows, so it appears it is meant to 
>> be used.
>> >>
>> >> v3 is back to the original patch with newline being printed. Thanks.
>> > > Peter, did you have anything more to say about patch 1 in this 
>> series?
>>
>> I think that patch is correct.  However, I wonder whether we even need 
>> that signal handler.  We could just delete the file immediately after 
>> opening it; then we don't need to worry about deleting it later.  On 
>> Windows, we could use O_TEMPORARY instead.
> 
> I don't think that would work because the same file is opened and closed 
> multiple times throughout the course of the program.

Ok, I have committed your 0001 patch.




В списке pgsql-hackers по дате отправления:

Предыдущее
От: Dilip Kumar
Дата:
Сообщение: Re: logical decoding and replication of sequences, take 2
Следующее
От: "Drouvot, Bertrand"
Дата:
Сообщение: Re: Synchronizing slots from primary to standby