13 |
//EOP |
//EOP |
14 |
|
|
15 |
*/ |
*/ |
16 |
|
#ifdef HAVE_SIGREG |
17 |
/* Here, we get the definition of the FC_NAMEMANGLE() macro. */ |
/* Here, we get the definition of the FC_NAMEMANGLE() macro. */ |
18 |
#include "FC_NAMEMANGLE.h" |
#include "FC_NAMEMANGLE.h" |
19 |
|
|
20 |
/* #define FC_NAMEMANGLE(X) X ## _ */ |
/* #define FC_NAMEMANGLE(X) X ## _ */ |
21 |
|
|
22 |
|
#ifdef HAVE_SIGREG |
23 |
#include <stdlib.h> |
#include <stdlib.h> |
24 |
#include <stdio.h> |
#include <stdio.h> |
25 |
#include <signal.h> |
#include <signal.h> |
34 |
*ip = *ip + 1; |
*ip = *ip + 1; |
35 |
return; |
return; |
36 |
} |
} |
37 |
|
#endif |
38 |
|
|
39 |
/* int main( int argc, char ** argv ) */ |
/* int main( int argc, char ** argv ) */ |
40 |
void FC_NAMEMANGLE(sigreg) (int * aip) |
void FC_NAMEMANGLE(sigreg) (int * aip) |
41 |
{ |
{ |
42 |
ip = aip; |
#ifdef HAVE_SIGREG |
43 |
struct sigaction s; |
struct sigaction s; |
44 |
|
ip = aip; |
45 |
s.sa_flags = SA_SIGINFO; |
s.sa_flags = SA_SIGINFO; |
46 |
s.sa_sigaction = (void *)killhandler; |
s.sa_sigaction = (void *)killhandler; |
47 |
if(sigaction (SIGTERM,&s,(struct sigaction *)NULL)) { |
if(sigaction (SIGTERM,&s,(struct sigaction *)NULL)) { |
48 |
printf("Sigaction returned error = %d\n", errno); |
printf("Sigaction returned error = %d\n", errno); |
49 |
exit(0); |
exit(0); |
50 |
} |
} |
51 |
|
#endif |
52 |
return; |
return; |
53 |
} |
} |
54 |
|
#endif |
55 |
|
|