Blame SOURCES/open-iscsi-2.0.874-4-iscsid-treat-SIGTERM-like-iscsiadm-k-0.patch

e88930
From c3122e9aedc4ebb49090df86e6f53806fed6cebc Mon Sep 17 00:00:00 2001
e88930
From: Lee Duncan <lduncan@suse.com>
e88930
Date: Wed, 23 Nov 2016 14:50:35 -0800
e88930
Subject: iscsid: treat SIGTERM like "iscsiadm -k 0"
e88930
e88930
The same code that is executed by iscsid
e88930
when iscsiadm sends the "immediate stop"
e88930
command should be executed when iscsid
e88930
receives a SIGTERM.
e88930
e88930
Changes since v1:
e88930
 * now just set the "event loop stop" flag
e88930
e88930
Signed-off-by: Lee Duncan <lduncan@suse.com>
e88930
---
e88930
 usr/iscsid.c | 3 +--
e88930
 1 file changed, 1 insertion(+), 2 deletions(-)
e88930
e88930
diff --git a/usr/iscsid.c b/usr/iscsid.c
e88930
index 0c2634448d09..81a14f259b5f 100644
e88930
--- a/usr/iscsid.c
e88930
+++ b/usr/iscsid.c
e88930
@@ -313,8 +313,7 @@ static void catch_signal(int signo)
e88930
 
e88930
 	switch (signo) {
e88930
 	case SIGTERM:
e88930
-		iscsid_shutdown();
e88930
-		exit(0);
e88930
+		event_loop_exit(NULL);
e88930
 		break;
e88930
 	default:
e88930
 		break;
e88930
-- 
e88930
2.9.3
e88930