Signal Handling in Hyperlight
October 23, 2025 ยท View on GitHub
Hyperlight registers custom signal handlers to intercept and manage specific signals, primarily SIGRTMIN. Here's an overview of the registration process:
- Custom Handlers:
SIGRTMINHandler: Utilized for inter-thread signaling, such as execution cancellation.- Killing a sandbox:
- To stop a sandboxed process, a
SIGRTMINsignal must be delivered to the thread running the sandboxed code. - The sandbox provides an interface to obtain an interrupt handle, which includes the thread ID and a method to dispatch the signal.
- Hyperlight uses the
pthread_killfunction to send this signal directly to the targeted thread.
- To stop a sandboxed process, a