sigaction() error checking

Add signal number verification to sigaction().
Also add a FIXME comment that we don't support mode sa_flags.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
signal() using sigaction()

Instead of duplicating sigaction()'s code, let's just use it.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
__sysv_signal()

Implement __sysv_signal(), which is used by code using signal() when compiled
with _XOPEN_SOURCE, -std=..., or something similar (see signal(2) manual page
for a full discussion of the two variants of signal()).

Fixes #238.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>