Re: [Toybox] signal or xsignal for sigatexit()?

2018-09-26 Thread Rob Landley
On 09/21/2018 07:06 PM, Gavin Howard wrote: > Rob, > > I'm not better than you at C, but I did have to dig deep into this for > my `bc', so I thought I would offer my 2 cents. > > First off, sigaction() is complex, but it is better in every other > way. It gives you a lot more options, has

Re: [Toybox] signal or xsignal for sigatexit()?

2018-09-21 Thread Gavin Howard
Rob, I'm not better than you at C, but I did have to dig deep into this for my `bc', so I thought I would offer my 2 cents. First off, sigaction() is complex, but it is better in every other way. It gives you a lot more options, has better ways of querying the current signal handlers, has better

[Toybox] signal or xsignal for sigatexit()?

2018-09-21 Thread Rob Landley
signal() defaults to SA_RESTART, xsignal() uses sigaction() which does not. I'm not sure which is correct? (It's currently using signal() and things seem ok with what?) *shrug* The readall() code assumes no SA_RESTART. The main downside of signal by default I'm aware of is having to poll before