]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_init: don't fail on bad signals
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 23 Jan 2014 02:49:55 +0000 (20:49 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 23 Jan 2014 02:55:09 +0000 (21:55 -0500)
Changelog: Jan 22: as Michael Warfield pointed out, we should only
ignore EINVAL, since EFAULT points to a more serious problem.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_init.c

index ae64af85834e49c1c3df5751de0b8637e52e341b..3e51c00e1dc5820ba9947f5c4e7f55b8afdacb44 100644 (file)
@@ -159,7 +159,7 @@ int main(int argc, char *argv[])
 
                act.sa_flags = 0;
                act.sa_handler = interrupt_handler;
-               if (sigaction(i, &act, NULL)) {
+               if (sigaction(i, &act, NULL) && errno != EINVAL) {
                        SYSERROR("failed to sigaction");
                        exit(EXIT_FAILURE);
                }