SCALE-RM
scalelib
src
common
scale_sys_sigvars.c
Go to the documentation of this file.
1
/*
2
* GET SIGNAL VALUE, (original 2016/06/30, R.Yoshida)
3
* setting IFAIL to 0 to indicate not appropriate value.
4
*/
5
6
#include <signal.h>
7
8
int
get_sigint
(
int
*ifail)
9
{
10
if
(SIGINT < 0) {
11
*ifail = 1;
12
return
0;
13
}
14
else
{
15
*ifail = 0;
16
return
SIGINT;
17
}
18
}
19
20
int
get_sigquit
(
int
*ifail)
21
{
22
if
(SIGQUIT < 0) {
23
*ifail = 1;
24
return
0;
25
}
26
else
{
27
*ifail = 0;
28
return
SIGQUIT;
29
}
30
}
31
32
int
get_sigabrt
(
int
*ifail)
33
{
34
if
(SIGABRT < 0) {
35
*ifail = 1;
36
return
0;
37
}
38
else
{
39
*ifail = 0;
40
return
SIGABRT;
41
}
42
}
43
44
int
get_sigfpe
(
int
*ifail)
45
{
46
if
(SIGFPE < 0) {
47
*ifail = 1;
48
return
0;
49
}
50
else
{
51
*ifail = 0;
52
return
SIGFPE;
53
}
54
}
55
56
int
get_sigsegv
(
int
*ifail)
57
{
58
if
(SIGSEGV < 0) {
59
*ifail = 1;
60
return
0;
61
}
62
else
{
63
*ifail = 0;
64
return
SIGSEGV;
65
}
66
}
67
68
int
get_sigterm
(
int
*ifail)
69
{
70
if
(SIGTERM < 0) {
71
*ifail = 1;
72
return
0;
73
}
74
else
{
75
*ifail = 0;
76
return
SIGTERM;
77
}
78
}
79
get_sigint
int get_sigint(int *ifail)
Definition:
scale_sys_sigvars.c:8
get_sigsegv
int get_sigsegv(int *ifail)
Definition:
scale_sys_sigvars.c:56
get_sigquit
int get_sigquit(int *ifail)
Definition:
scale_sys_sigvars.c:20
get_sigterm
int get_sigterm(int *ifail)
Definition:
scale_sys_sigvars.c:68
get_sigabrt
int get_sigabrt(int *ifail)
Definition:
scale_sys_sigvars.c:32
get_sigfpe
int get_sigfpe(int *ifail)
Definition:
scale_sys_sigvars.c:44
Generated by
1.8.13