If it actually changes signal handler settings, it will be difficult to use it in multithreaded code.
Typically what you actually want is to block a set of signals in a critical region.  If it's the intention, I'd suggest to name it 'with-signals-blocked'.
It can be implemented both in single-thread implementation (sigprocmask) or multi-threaded implementation (pthread_sigmask).


On Sat, Aug 17, 2019 at 7:35 AM John Cowan <xxxxxx@ccil.org> wrote:
 I suggest that SRFI 170 get back the ability to ignore signals, which is much more straightforward than trapping them.  Here's a proposal:

(with-signals-ignored signal-list thunk)

Signal-list is a list of signal numbers. Signals that are already ignored, cannot be ignored, or are being trapped by the implementation are filtered out of the list.  The thunk is then executed under the control of dynamic-wind, using a before-thunk that ignores each of the remaining signals and an after-thunk that restores the default disposition.

Comments?


John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
If I have seen farther than others, it is because I was looking through a
spyglass with my one good eye, with a parrot standing on my shoulder. --"Y"