!8334 Handle SIGTERM signal

From: @zhoufeng54
Reviewed-by: @kisnwang,@pandoublefeng
Signed-off-by: @pandoublefeng
This commit is contained in:
mindspore-ci-bot 2020-11-09 21:07:15 +08:00 committed by Gitee
commit 876fc504d0
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ void RegisterHandlers() {
(void)sigemptyset(&new_int_action.sa_mask); (void)sigemptyset(&new_int_action.sa_mask);
new_int_action.sa_flags = SA_RESTART | SA_SIGINFO; new_int_action.sa_flags = SA_RESTART | SA_SIGINFO;
(void)sigaction(SIGINT, &new_int_action, nullptr); (void)sigaction(SIGINT, &new_int_action, nullptr);
(void)sigaction(SIGTERM, &new_int_action, nullptr);
} }
extern void IntHandler(int sig_num, // The signal that was raised extern void IntHandler(int sig_num, // The signal that was raised