浏览代码

Added SIGTERM kill signal handling

OlliC 7 年之前
父节点
当前提交
c0a2d53981
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      daemon/main.c

+ 3 - 0
daemon/main.c

@@ -133,6 +133,9 @@ int main(int argc, char *argv[])
 	if (signal(SIGINT, sigint_handler) == SIG_ERR) {
 	if (signal(SIGINT, sigint_handler) == SIG_ERR) {
 		FATAL_ERRORNO("Could not catch SIGINT");
 		FATAL_ERRORNO("Could not catch SIGINT");
 	}
 	}
+	if (signal(SIGTERM, sigint_handler) == SIG_ERR) {
+		FATAL_ERRORNO("Could not catch SIGTERM");
+	}
 
 
 	/* Run the main dbus message loop */
 	/* Run the main dbus message loop */
 	game_mode_context_loop(context);
 	game_mode_context_loop(context);