Commit bec22df6 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
......@@ -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_SUCCESS);
}
else {
fprintf(stderr, "%s: receiving SIGTERM\n", blc_program_id);
blc_status=BLC_QUIT;
}
}
static void on_sigtstp(int){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment