diff options
-rw-r--r-- | usr/iscsid.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/usr/iscsid.c b/usr/iscsid.c index 1a37347..9df6658 100644 --- a/usr/iscsid.c +++ b/usr/iscsid.c @@ -304,6 +304,11 @@ static void iscsid_shutdown(void) static void catch_signal(int signo) { log_debug(1, "pid %d caught signal %d", getpid(), signo); + + /* In foreground mode, treat SIGINT like SIGTERM */ + if (!daemonize && signo == SIGINT) + signo = SIGTERM; + switch (signo) { case SIGTERM: iscsid_shutdown(); |