summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLee Duncan <lduncan@suse.com>2016-11-23 14:50:35 -0800
committerLee Duncan <lduncan@suse.com>2016-11-23 14:50:35 -0800
commitc3122e9aedc4ebb49090df86e6f53806fed6cebc (patch)
tree11bdd82e3175bf53fc50239598c0d4d7ee59e44b
parent2b099d7b7e04bc42f747e75e87b053d564ee76bd (diff)
downloadopen-iscsi-c3122e9aedc4ebb49090df86e6f53806fed6cebc.tar.gz
iscsid: treat SIGTERM like "iscsiadm -k 0"
The same code that is executed by iscsid when iscsiadm sends the "immediate stop" command should be executed when iscsid receives a SIGTERM. Changes since v1: * now just set the "event loop stop" flag Signed-off-by: Lee Duncan <lduncan@suse.com>
-rw-r--r--usr/iscsid.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr/iscsid.c b/usr/iscsid.c
index 0c26344..81a14f2 100644
--- a/usr/iscsid.c
+++ b/usr/iscsid.c
@@ -313,8 +313,7 @@ static void catch_signal(int signo)
switch (signo) {
case SIGTERM:
- iscsid_shutdown();
- exit(0);
+ event_loop_exit(NULL);
break;
default:
break;