From: | "Tristan Partin" <tristan(at)neon(dot)tech> |
---|---|
To: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Clean up some signal usage mainly related to Windows |
Date: | 2023-07-06 20:43:32 |
Message-ID: | CTVDKVZCCVSY.1XQ87UL50KQRD@gonk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
v1-0001-Use-signal-safe-functions-in-signal-handler.patch | text/x-patch | 906 bytes |
v1-0002-Cleanup-some-signal-usage-on-Windows.patch | text/x-patch | 4.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2023-07-06 20:47:47 | Re: [PoC] Federated Authn/z with OAUTHBEARER |
Previous Message | PG Bug reporting form | 2023-07-06 20:29:19 | BUG #18016: REINDEX TABLE failure |