Skip to content
Snippets Groups Projects
Commit 0743af0d authored by Arnaud Blanchard's avatar Arnaud Blanchard
Browse files

Try to quit normally (blc_status=BLC_QUIT) while receiving SIGTREM the first...

Try to quit normally (blc_status=BLC_QUIT) while receiving SIGTREM the first time, the second time, use exit()
parent c6c4f41a
No related branches found
No related tags found
No related merge requests found
......@@ -408,8 +408,14 @@ void blc_program_args_display_help()
}
static void on_sigterm(int){
fprintf(stderr, "%s: receiving SIGTERM\n", blc_program_id);
exit(EXIT_SUCCESS);
if (blc_status==BLC_QUIT){
fprintf(stderr, "%s: receiving SIGTERM in quiting mode. Force to quit.\n", blc_program_id);
exit(EXIT_FAILURE);
}
else {
fprintf(stderr, "%s: receiving SIGTERM\n", blc_program_id);
blc_command_ask_quit();
}
}
static void on_sigtstp(int){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment