Package: lxc
Version: 1.0.0-3
Severity: normal
Tags: patch

Hi,

Starting with lxc 1.0.0 (?) lxc-attach terminates on SIGINT, which is 
extremely annoying. Pressing Ctrl-C should kill the running process, not 
the whole session.

The attached patch is a quick attempt to fix that and it works for me.

Cheers,
Stefan Siegel
diff -Nur lxc.orig/src/lxc/lxc_attach.c lxc/src/lxc/lxc_attach.c
--- lxc.orig/src/lxc/lxc_attach.c	2014-02-27 15:10:50.535371250 +0100
+++ lxc/src/lxc/lxc_attach.c	2014-02-27 15:28:42.228499481 +0100
@@ -26,6 +26,7 @@
 #include <sys/wait.h>
 #include <sys/types.h>
 #include <stdlib.h>
+#include <signal.h>
 
 #include "attach.h"
 #include "arguments.h"
@@ -231,6 +232,7 @@
 	if (ret < 0)
 		return -1;
 
+	signal(SIGINT, SIG_IGN);
 	ret = lxc_wait_for_pid_status(pid);
 	if (ret < 0)
 		return -1;

Reply via email to