[stgt] [PATCH] tgtd: allow Ctrl-C to kill tgtd

Andy Grover agrover at redhat.com
Fri May 6 20:11:56 CEST 2011


When running tgtd in the foreground, killing it with ^C seems pretty
handy. Is there a downside?

Signed-off-by: Andy Grover <agrover at redhat.com>
---
 usr/tgtd.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/usr/tgtd.c b/usr/tgtd.c
index fd52ed5..c96bd81 100644
--- a/usr/tgtd.c
+++ b/usr/tgtd.c
@@ -481,11 +481,9 @@ int main(int argc, char **argv)
 	int use_kernel = 0;
 	int ret;
 
-	/* do not allow ctrl-c for now... */
 	sa_new.sa_handler = signal_catch;
 	sigemptyset(&sa_new.sa_mask);
 	sa_new.sa_flags = 0;
-	sigaction(SIGINT, &sa_new, &sa_old);
 	sigaction(SIGPIPE, &sa_new, &sa_old);
 	sigaction(SIGTERM, &sa_new, &sa_old);
 
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list