Signed-off-by: Ferenc Wagner <wf...@niif.hu>
---
 src/lxc/start.c |    9 ---------
 src/lxc/utils.h |   27 ---------------------------
 2 files changed, 0 insertions(+), 36 deletions(-)

diff --git a/src/lxc/start.c b/src/lxc/start.c
index 851d383..ee79892 100644
--- a/src/lxc/start.c
+++ b/src/lxc/start.c
@@ -129,9 +129,6 @@ int signalfd(int fd, const sigset_t *mask, int flags)
 
 lxc_log_define(lxc_start, lxc);
 
-LXC_TTY_HANDLER(SIGINT);
-LXC_TTY_HANDLER(SIGQUIT);
-
 static int match_fd(int fd)
 {
        return (fd == 0 || fd == 1 || fd == 2);
@@ -574,10 +571,6 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
                goto out_fini;
        }
 
-       /* Avoid signals from terminal */
-       LXC_TTY_ADD_HANDLER(SIGINT);
-       LXC_TTY_ADD_HANDLER(SIGQUIT);
-
        err = lxc_poll(name, handler);
        if (err) {
                ERROR("mainloop exited with an error");
@@ -589,8 +582,6 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
 
        err =  lxc_error_set_and_log(handler->pid, status);
 out_fini:
-       LXC_TTY_DEL_HANDLER(SIGQUIT);
-       LXC_TTY_DEL_HANDLER(SIGINT);
        lxc_unlink_nsgroup(name);
        lxc_fini(name, handler);
        return err;
diff --git a/src/lxc/utils.h b/src/lxc/utils.h
index 114b668..b800b1e 100644
--- a/src/lxc/utils.h
+++ b/src/lxc/utils.h
@@ -23,33 +23,6 @@
 #ifndef _utils_h
 #define _utils_h
 
-#define LXC_TTY_HANDLER(s) \
-       static struct sigaction lxc_tty_sa_##s;                         \
-       static void tty_##s##_handler(int sig, siginfo_t *info, void *ctx) \
-       {                                                               \
-               if (lxc_tty_sa_##s.sa_handler == SIG_DFL ||             \
-                   lxc_tty_sa_##s.sa_handler == SIG_IGN)               \
-                       return;                                         \
-               (*lxc_tty_sa_##s.sa_sigaction)(sig, info, ctx); \
-       }
-
-#define LXC_TTY_ADD_HANDLER(s) \
-       do { \
-               struct sigaction sa; \
-               sa.sa_sigaction = tty_##s##_handler; \
-               sa.sa_flags = SA_SIGINFO; \
-               sigfillset(&sa.sa_mask); \
-               /* No error expected with sigaction. */ \
-               sigaction(s, &sa, &lxc_tty_sa_##s); \
-       } while (0)
-
-#define LXC_TTY_DEL_HANDLER(s) \
-       do { \
-               sigaction(s, &lxc_tty_sa_##s, NULL); \
-       } while (0)
-
-#endif
-
 extern int lxc_copy_file(const char *src, const char *dst);
 extern int lxc_setup_fs(void);
 extern int get_u16(ushort *val, const char *arg, int base);
-- 
1.6.5


------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to