1 typedef struct
2 {
3 }
4 __sigset_t;
5 typedef struct
6 {
7     char coredump;
8 }
9 EMode;
10 extern EMode Mode;
11 struct sigaction
12 {
13   __sigset_t sa_mask;
14   int sa_flags;
15 };
doSignalsSetup(void)16 doSignalsSetup (void)
17 {
18   static const int signals[] = {
19     1, 2 , 3, 4, 6, 8, 11, 13, 14, 15, 10, 12, 17, 7
20   };
21   unsigned int i, sig;
22   struct sigaction sa;
23   for (i = 0; i < sizeof (signals) / sizeof (int); i++)
24     {
25       sig = signals[i];
26       if (Mode.coredump && (sig == 4 || sig == 8))
27         continue;
28       sa.sa_flags = (sig == 17);
29       sigemptyset (&sa.sa_mask);
30     }
31 }
32