News for hackers. Stuff that matters.
Re:Why isn't memset() async-signal-safe? by Animats on Tuesday January 03, 2017 @07:21PM (#13314571)
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.
Re:Why isn't memset() async-signal-safe? by majke on Tuesday January 03, 2017 @08:01PM (#13314800)
So 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/

Re:Why isn't memset() async-signal-safe? by Animats on Tuesday January 03, 2017 @08:55PM (#13315054)
You'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.