Expand description
What a syscall interrupted for a caught signal gives the guest, by Linux’s x86 table (A5 design 16.6 and D40, D43).
A wait that Detcore ends because a caught signal is pending ends with one
of the kernel’s private restart codes. On ptrace the kernel applies the
table itself when it builds the handler’s frame. Where Detcore ends the
wait and the kernel never sees the code (an in-guest backend under its
delivery gate, Config::in_guest_signal_delivery), Detcore applies the
same table, with the action of the first caught delivery at that return,
and the backend only writes the registers. Ignored instances ahead of it
are discarded without touching the registers, and a later frame at the
same return sees the result the first one left (-EINTR, or the call’s
number to run again), which is no longer a restart code.
Enums§
- Caught
Signal Return - What the guest’s syscall does once the caught signal’s frame is built.
Constants§
- ERESTARTNOHAND
- See
ERESTARTSYS. - ERESTARTNOINTR
- See
ERESTARTSYS. - ERESTARTSYS
- The kernel’s private restart codes, as negative results (include/linux/errno.h v6.12 lines 14-18, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/include/linux/errno.h?h=v6.12#n14).
- ERESTART_
RESTARTBLOCK - See
ERESTARTSYS.
Functions§
- caught_
signal_ return - The syscall’s outcome when a caught signal whose action has
sa_flagsis delivered at its return with raw resultresult(an errno as its negative): Linux’shandle_signal, arch/x86/kernel/signal.c v6.12 lines 264-282, https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/arch/x86/kernel/signal.c?h=v6.12#n264: