36 use,
intrinsic :: iso_c_binding
45 bind(c, name=
'sighdl_timeout')
46 use,
intrinsic :: iso_c_binding
52 bind(c, name=
'sighdl_usr')
53 use,
intrinsic :: iso_c_binding
59 bind(c, name=
'sighdl_set_timeout')
60 use,
intrinsic :: iso_c_binding
68 bind(c, name=
'sighdl_trap_cpulimit')
69 use,
intrinsic :: iso_c_binding
75 bind(c, name=
'sighdl_trap_usr')
76 use,
intrinsic :: iso_c_binding
96 integer,
intent(in) :: usr
98 integer(kind=c_int8_t) :: usr12
106 if (bge(usr12, usr))
then
116 integer(kind=c_int) :: sec
119 call neko_error(
'sighdl failed to set SIGALRM')
126 logical,
save :: initialized = .false.
128 if (.not. initialized)
then
130 call neko_error(
'sighdl failed to trap SIGXCPU')
139 logical,
save :: initialized = .false.
141 if (.not. initialized)
then
143 call neko_error(
'sighdl failed to trap SIGUSR*')
Interface to signal handler.
subroutine, public signal_set_timeout(sec)
Set a timeout after seconds.
logical function, public signal_usr(usr)
Check if a user signal has been raised.
subroutine, public signal_trap_usr()
Initialize signal handler to trap SIGUSR1 and SIGUSR2.
logical function, public signal_timeout()
Check if any timeout has occurred (either SIGXCPU or SIGALRM)
subroutine, public signal_trap_cpulimit()
Initialize signal handler to trap SIGXCPU.