]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
sigprocmask moved in fini of start.c
authorMichel Normand <normand@fr.ibm.com>
Wed, 26 May 2010 14:54:48 +0000 (16:54 +0200)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Wed, 26 May 2010 14:54:48 +0000 (16:54 +0200)
Signed-off-by: Michel Normand <normand@fr.ibm.com>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/start.c

index 5924c1436e3ee973f52f70b734f7612cb20bde61..c6eef46a6b0f4c59f7a454b5acd3582ac9e373de 100644 (file)
@@ -398,6 +398,10 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
        lxc_set_state(name, handler, STOPPING);
        lxc_set_state(name, handler, STOPPED);
 
+       /* reset mask set by setup_sigchld_fd */
+       if (sigprocmask(SIG_SETMASK, &handler->oldmask, NULL))
+               WARN("failed to restore sigprocmask");
+
        lxc_delete_console(&handler->conf->console);
        lxc_delete_tty(&handler->conf->tty_info);
        free(handler->name);
@@ -609,9 +613,6 @@ int lxc_start(const char *name, char *const argv[], struct lxc_conf *conf)
        while (waitpid(handler->pid, &status, 0) < 0 && errno == EINTR)
                continue;
 
-       if (sigprocmask(SIG_SETMASK, &handler->oldmask, NULL))
-               WARN("failed to restore sigprocmask");
-
        err =  lxc_error_set_and_log(handler->pid, status);
 out_fini:
        lxc_unlink_nsgroup(name);