Signed-off-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
struct lxc_proc_context_info *i, lxc_attach_options_t *options)
{
struct lxc_container *c;
-
+
if (!(options->namespaces & CLONE_NEWNS) || !(options->attach_flags & LXC_ATTACH_LSM))
return true;
goto cleanup_error;
}
+ /* ignore SIGKILL (CTRL-C) and SIGQUIT (CTRL-\) - issue #313 */
+ signal(SIGINT, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
+
/* reap intermediate process */
ret = wait_for_pid(pid);
if (ret < 0)