Re: Handling fatal signals in GNU make

Paul Eggert <[email protected]> Mon, 20 May 2019 21:20:52 -0700
Newsgroups gmane.comp.gnu.make.devel
Organization UCLA Computer Science Department
Message-ID <[email protected]>
Paul Smith wrote:
> Another thought I had: we have already wrapped most system calls with
> the EINTRLOOP macro.  One possibility would be to extend this macro so
> it does the check of the "received fatal signal" flag, then disable
> SA_RESTART and rely on this loop in all situations.  We might need to
> review the code to make sure we haven't missed places that need it.
> This is seriously old-school: I guess this is how signals had to be
> managed originally?

This sounds pretty much like what Emacs does when it's run interactively. Yes, 
it's old-school, but it does work. As I recall, Emacs used SA_RESTART long ago, 
but that was flaky and eventually was backed out in favor of the old-school 
approach.