Re:Why isn't memset() async-signal-safe?
by nine_k on Tuesday January 03, 2017 @05:37PM
(#13313858)
Related: Unix signals are deemed "unfixable" by some: https://lwn.net/Articles/414618/
[ Parent
| on HN ]
Re:Why isn't memset() async-signal-safe?
by quotemstr on Tuesday January 03, 2017 @05:53PM
(#13314006)
That's an extreme perspective. I've made extensive use of signals in programs that have shipped to hundreds of millions of users. If you're careful, they work fine. Yes, POSIX needs something like NT's vectored exception handlers that could allow multiple users of the same signal to cooperate: but that's an API problem, not something inherently "unfixable" about a program being interrupted and temporarily doing something else for a bit.
Re:Why isn't memset() async-signal-safe?
by SFJulie on Tuesday January 03, 2017 @06:32PM
(#13314313)
Unix signal are an OS try at giving user a portable abstraction for software interrupts (HW Int & trap). It confusingly employs much of the jargon (masking, priorities, bottom halves...)
http://stackoverflow.com/questions/13341870/signals-and-inte...
I have the intuition knowing the HW/ASM & the code but ignoring how POSIX works (I read stevens, but I am not having all my answers) that unices reimplement in SW what the HW does with wires.
Maybe this could be fixable at the HW level? (and maybe I guess requiring kernel privileges)?
Re:Why isn't memset() async-signal-safe?
by stuckagain on Tuesday January 03, 2017 @05:47PM
(#13313947)
Where "some" includes everyone who has ever had to use them.