From 645c562f73704458e65c90248a1f984e524152c0 Mon Sep 17 00:00:00 2001 From: zhoufeng Date: Sun, 8 Nov 2020 15:00:35 +0800 Subject: [PATCH] handle SIGTERM signal Signed-off-by: zhoufeng --- mindspore/ccsrc/minddata/dataset/util/sig_handler.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/mindspore/ccsrc/minddata/dataset/util/sig_handler.cc b/mindspore/ccsrc/minddata/dataset/util/sig_handler.cc index 8aa5951b14d..ec9c254c452 100644 --- a/mindspore/ccsrc/minddata/dataset/util/sig_handler.cc +++ b/mindspore/ccsrc/minddata/dataset/util/sig_handler.cc @@ -35,6 +35,7 @@ void RegisterHandlers() { (void)sigemptyset(&new_int_action.sa_mask); new_int_action.sa_flags = SA_RESTART | SA_SIGINFO; (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