Clean up some signal usage mainly related to Windows - Mailing list pgsql-hackers

From Tristan Partin
Subject Clean up some signal usage mainly related to Windows
Date
Msg-id CTVDKVZCCVSY.1XQ87UL50KQRD@gonk
Whole thread Raw
Responses Re: Clean up some signal usage mainly related to Windows
List pgsql-hackers
Windows has support for some signals[0], like SIGTERM and SIGINT. SIGINT
must be handled with care on Windows since it is handled in a separate
thread. SIGTERM however can be handled in a similar way to UNIX-like
systems. I audited a few pqsignal calls that were blocked by WIN32 to
see if they could become used, and made some adjustments. Definitely
hoping for someone with more Windows knowledge to audit this.

In addition, I found that signal_cleanup() in pg_test_fsync.c was not
using signal-safe functions, so I went ahead and fixed those to use
their signal-safe equivalents.

[0]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/signal

--
Tristan Partin
Neon (https://neon.tech)

Attachment

pgsql-hackers by date:

Previous
From: Matthias van de Meent
Date:
Subject: Re: Disabling Heap-Only Tuples
Next
From: Thomas Munro
Date:
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER