[lxc-devel] [PATCH] [RFC] lxc-init: fix odd signal mask manipulation

Matt Helsley matthltc at us.ibm.com
Tue Oct 11 23:18:13 UTC 2011


lxc init modifies a different signal mask in the loop than the one it's
installing with sigaction in the loop. It appears that either these
lines should move outside the loop, or the intent was to clear the
bits of the sa_mask instead of the mask.

Signed-off-by: Matt Helsley <matthltc at us.ibm.com>

Should the same mask bits be cleared from the mask set with
sigprocmask prior to sigprocmask() above? (won't show up in diff
context, sorry)
---
 src/lxc/lxc_init.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lxc/lxc_init.c b/src/lxc/lxc_init.c
index a534b51..b111494 100644
--- a/src/lxc/lxc_init.c
+++ b/src/lxc/lxc_init.c
@@ -101,9 +101,9 @@ int main(int argc, char *argv[])
 		struct sigaction act;
 
 		sigfillset(&act.sa_mask);
-		sigdelset(&mask, SIGILL);
-		sigdelset(&mask, SIGSEGV);
-		sigdelset(&mask, SIGBUS);
+		sigdelset(&act.sa_mask, SIGILL);
+		sigdelset(&act.sa_mask, SIGSEGV);
+		sigdelset(&act.sa_mask, SIGBUS);
 		act.sa_flags = 0;
 		act.sa_handler = interrupt_handler;
 		sigaction(i, &act, NULL);
-- 
1.7.4.1





More information about the lxc-devel mailing list