!13029 signal int handler

From: @zhoufeng54
Reviewed-by: @kisnwang,@xu-yfei
Signed-off-by: @xu-yfei
This commit is contained in:
mindspore-ci-bot 2021-03-10 15:35:21 +08:00 committed by Gitee
commit e2ad028194
1 changed files with 3 additions and 1 deletions

View File

@ -46,6 +46,8 @@ void SignalGuard::RegisterHandlers() {
void SignalGuard::IntHandler(int, siginfo_t *, void *) {
kernel::AscendKernelBuildClient::Instance().Close();
MS_LOG_EXCEPTION << "KeyboardInterrupt";
int this_pid = getpid();
MS_LOG(WARNING) << "Process " << this_pid << " receive KeyboardInterrupt signal.";
(void)kill(this_pid, SIGTERM);
}
} // namespace mindspore