signals: Enable ^C cancellation on macOS, OpenBSD and Windows
Restructure the SIGINT escalation machinery for platform portability:
the rescue timer now has three implementations (POSIX timers on
Linux/FreeBSD, an EVFILT_TIMER on the signal listener's kqueue on
macOS/OpenBSD, and a timer-queue timer on Windows), and the request
side is shared through jl_sigint_request_cancellation.
Darwin gains thread_suspend-based implementations of the cancellation
and abandonment senders (these were previously only implemented in
terms of SIGUSR2, which left libjulia unlinkable on macOS); Windows
gains SuspendThread/GetThreadContext-based equivalents, and its console
ctrl handler and CRT SIGINT handler now go through the cancellation
request path, including the abandon escalation, instead of force-
throwing InterruptException.
N.B.: the macOS/OpenBSD and Windows paths are untested (this
environment can only build and test Linux) and need CI validation.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012nCkyKUguncLLJrH9K5o7m