Per https://pubs.opengroup.org/onlinepubs/007904875/functions/sigaction.html and https://man7.org/linux/man-pages/man2/sigaction.2.html, there's an sa_handler field for the sigaction struct. On Linux with some architectures, it may be aliased to sa_sigaction, but it's always there.
This is required in order to know what the previous signal handler was, and more importantly, whether it was previously ignored (.sa_handler == SIG_IGN) or set to the default disposition (.sa_handler == SIG_DFL).
Also, this allows omitting the SA_SIGINFO property of sa_flags, offering a simpler API for most common cases as it's just one (commonly-ignored) argument, not three.
Per https://pubs.opengroup.org/onlinepubs/007904875/functions/sigaction.html and https://man7.org/linux/man-pages/man2/sigaction.2.html, there's an
sa_handlerfield for thesigactionstruct. On Linux with some architectures, it may be aliased tosa_sigaction, but it's always there.This is required in order to know what the previous signal handler was, and more importantly, whether it was previously ignored (
.sa_handler == SIG_IGN) or set to the default disposition (.sa_handler == SIG_DFL).Also, this allows omitting the
SA_SIGINFOproperty ofsa_flags, offering a simpler API for most common cases as it's just one (commonly-ignored) argument, not three.