SIGTERM
This commit is contained in:
parent
8d2af578fd
commit
0fc5dce6ed
@ -79,7 +79,7 @@ void sig_handler (int signo);
|
|||||||
volatile bool g_abort = false;
|
volatile bool g_abort = false;
|
||||||
// signal handler
|
// signal handler
|
||||||
void sig_handler (int signo){
|
void sig_handler (int signo){
|
||||||
if (signo == SIGINT){
|
if (signo == SIGINT || signo == SIGTERM){
|
||||||
g_abort = true;
|
g_abort = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -175,6 +175,7 @@ int main (
|
|||||||
else if(command==COMMAND_ENSTROPHY){
|
else if(command==COMMAND_ENSTROPHY){
|
||||||
// register signal handler to handle aborts
|
// register signal handler to handle aborts
|
||||||
signal(SIGINT, sig_handler);
|
signal(SIGINT, sig_handler);
|
||||||
|
signal(SIGTERM, sig_handler);
|
||||||
enstrophy(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.final_time, parameters.nu, parameters.delta, parameters.L, parameters.adaptive_tolerance, parameters.adaptive_factor, u0, g, parameters.irreversible, parameters.algorithm, parameters.print_freq, parameters.starting_time, nthreads, savefile, (char*)argv[0], param_str, savefile_str);
|
enstrophy(parameters.K1, parameters.K2, parameters.N1, parameters.N2, parameters.final_time, parameters.nu, parameters.delta, parameters.L, parameters.adaptive_tolerance, parameters.adaptive_factor, u0, g, parameters.irreversible, parameters.algorithm, parameters.print_freq, parameters.starting_time, nthreads, savefile, (char*)argv[0], param_str, savefile_str);
|
||||||
}
|
}
|
||||||
else if(command==COMMAND_QUIET){
|
else if(command==COMMAND_QUIET){
|
||||||
|
Loading…
Reference in New Issue
Block a user