pub fn caught_signal_return(result: i64, sa_flags: u64) -> CaughtSignalReturnExpand description
The syscall’s outcome when a caught signal whose action has sa_flags is
delivered at its return with raw result result (an errno as its
negative): Linux’s handle_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:
-ERESTART_RESTARTBLOCKand-ERESTARTNOHANDreturn-EINTR;-ERESTARTSYSreturns-EINTRwithoutSA_RESTART, and restarts with it;-ERESTARTNOINTRrestarts, whatever the flags;- any other result is returned as it is.
Only for the first caught delivery at the return. With no handler at all,
the kernel restarts instead (lines 343-357): -ERESTARTNOHAND,
-ERESTARTSYS and -ERESTARTNOINTR run the same call again, and
-ERESTART_RESTARTBLOCK runs restart_syscall (lines 353-356), not the
same call. Neither that case nor a default-fatal delivery, which ends the
process, comes here.