Contents of /trunk/mkinitrd-magellan/klibc/usr/klibc/__signal.c
Parent Directory | Revision Log
Revision 532 -
(show annotations)
(download)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 342 byte(s)
Sat Sep 1 22:45:15 2007 UTC (16 years, 8 months ago) by niro
File MIME type: text/plain
File size: 342 byte(s)
-import if magellan mkinitrd; it is a fork of redhats mkinitrd-5.0.8 with all magellan patches and features; deprecates magellan-src/mkinitrd
1 | /* |
2 | * __signal.c |
3 | */ |
4 | |
5 | #include <signal.h> |
6 | |
7 | __sighandler_t __signal(int signum, __sighandler_t handler, int flags) |
8 | { |
9 | struct sigaction sa; |
10 | |
11 | sa.sa_handler = handler; |
12 | sa.sa_flags = flags; |
13 | sigemptyset(&sa.sa_mask); |
14 | |
15 | if (sigaction(signum, &sa, &sa)) { |
16 | return (__sighandler_t) SIG_ERR; |
17 | } else { |
18 | return (__sighandler_t) sa.sa_handler; |
19 | } |
20 | } |