> I want to clean up (close curses) on termination on signals.
>
> Is there a way of doing this for all relevant signals at once, or I
> should install separate handlers for each?
>
> Is there a better way of executing the old handler than the following?
> fixIO $ \old -> installHandler
> keyboardSignal
> (Catch (do
> endWin
> installHandler keyboardSignal old Nothing
> raiseSignal keyboardSignal))
> Nothing
>
> sigaction returns complete information about the old signal: handler,
> mask and flags, thus allowing exact restoring of the previous
> state. But Posix.installHandler returns only the old handler, and
> does not take nor return any flags. The above is only an
> approximation.
> Should it be fixed?
>
> Why installHandler takes Maybe SignalSet instead of SignalSet?
> Nothing is equivalent to emptySignalSet, it does not carry any
> additional information.
I agree with all your points here. The POSIX library needs revamping
somewhat; but I've been waiting for the FFI story to settle down before
thinking about this.
Cheers,
Simon