Documentation ¶
Overview ¶
Package sigframe implements a mechanism to create a signal frame on the stack and execute a user-defined callback function within that context. The callback function can use the `sigreturn` system call to resuming the current thread with the state from the signal frame. This functionality can be helpful in scenarios where you need to simulate a signal handler-like behavior without triggering a signal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallWithSignalFrame ¶
func CallWithSignalFrame(signalStack *linux.SignalStack, handlerAddr uintptr, sigmask *linux.SignalSet, rax uint64) error
CallWithSignalFrame sets up a signal frame on the stack and executes a user-defined callback function within that context.
Caller-save registers can be used for passing arguments to the handler. These registers must be pre-set within the signal frame.
func Sigreturn ¶
func Sigreturn(sigframeAddr *arch.UContext64)
Sigreturn restores the thread state from the signal frame.
Types ¶
This section is empty.