2 ms·
Returning from the signal handler occurs in user space. It's the C library's handling of signal save and return that matters here, not what the kernel does.
by Animats 10y ago
Returning from the signal handler occurs in user space. It's the C library's handling of signal save and return that matters here, not what the kernel does.
- majke 10y agoSo what does the sigreturn(2) syscall actually do? I herby claim that sigreturn() restores the user space state in kernel context: https://lwn.net/Articles/676803/ https://lwn.net/Articles/676803/
- Animats 10y agoYou're right; "sigreturn" wasn't in early UNIX systems but appeared in 4.3BSD. That job can also be done in user space, but there's a timing window against other signals if done that way.