]> git.ipfire.org Git - thirdparty/curl.git/commit
servers: drop re-registering the signal handler on modern systems master
authorViktor Szakats <commit@vsz.me>
Wed, 5 Aug 2026 17:10:52 +0000 (19:10 +0200)
committerViktor Szakats <commit@vsz.me>
Wed, 5 Aug 2026 17:34:52 +0000 (19:34 +0200)
commit133785b15936d9417fdc41f77b87304b6bf458d5
tree40f4ec5edf1369198e8a1b137f30efbb85be0a5b
parentb11e0026f71aa33b47d3b31f7c6a2aee4f929b12
servers: drop re-registering the signal handler on modern systems

Before this patch modern systems used `sigaction()` and `SA_RESTART` to
install signal handlers, but the signal handler function itself still
made a call to the legacy `signal()` function to re-register itself
before returning.

Re-registering the handler is not necessary with `sigaction()`. It's
also undesired to use the legacy API when the modern one is available.

Fix by guarding off this call in builds that support the modern API.

Follow-up to 3fb6e5a01001b8c7dfdc33a89041178aac381a27 #6529
Follow-up to 18cbb4d7d645016d1a9c0ee772c724d8c41db3bd

Closes #22497
tests/server/util.c