36 use,
intrinsic :: iso_c_binding
41 bind(c, name=
'sighdl_timeout')
42 use,
intrinsic :: iso_c_binding
48 bind(c, name=
'sighdl_usr')
49 use,
intrinsic :: iso_c_binding
55 bind(c, name=
'sighdl_set_timeout')
56 use,
intrinsic :: iso_c_binding
64 bind(c, name=
'sighdl_trap_cpulimit')
65 use,
intrinsic :: iso_c_binding
71 bind(c, name=
'sighdl_trap_usr')
72 use,
intrinsic :: iso_c_binding
92 integer,
intent(in) :: usr
94 integer(kind=c_int8_t) :: usr12
102 if (bge(usr12, usr))
then
112 integer(kind=c_int) :: sec
115 call neko_error(
'sighdl failed to set SIGALRM')
122 logical,
save :: initialized = .false.
124 if (.not. initialized)
then
126 call neko_error(
'sighdl failed to trap SIGXCPU')
135 logical,
save :: initialized = .false.
137 if (.not. initialized)
then
139 call neko_error(
'sighdl failed to trap SIGUSR*')
Interface to signal handler.
subroutine signal_trap_usr()
Initialize signal handler to trap SIGUSR1 and SIGUSR2.
logical function signal_timeout()
Check if any timeout has occurred (either SIGXCPU or SIGALRM)
subroutine signal_set_timeout(sec)
Set a timeout after seconds.
logical function signal_usr(usr)
Check if a user signal has been raised.
subroutine signal_trap_cpulimit()
Initialize signal handler to trap SIGXCPU.