Systemd/klibc/klibc/__signal.c
greg@kroah.com a41a0e28c2 [PATCH] added klibc version 0.82 (cvs tree) to the udev tree.
Not hooked up to the build yet.
2005-04-26 21:05:23 -07:00

23 lines
364 B
C

/*
* __signal.c
*/
#include <signal.h>
__sighandler_t __signal(int signum, __sighandler_t handler, int flags)
{
struct sigaction sa;
sa.sa_handler = handler;
sa.sa_flags = flags;
sigemptyset(&sa.sa_mask);
if ( sigaction(signum, &sa, &sa) ) {
return (__sighandler_t)SIG_ERR;
} else {
return (__sighandler_t)sa.sa_handler;
}
}