Commit 135659e0 authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

criu: restore blocked signals correctly

We need to use SIG_SETMASK instead of SIG_BLOCK.

SIG_SETMASK
      The set of blocked signals is set to the argument set.
Signed-off-by: 's avatarAndrew Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a082f27b
......@@ -1201,7 +1201,7 @@ int stop_usernsd(void)
ret = -1;
usernsd_pid = 0;
sigprocmask(SIG_BLOCK, &oldmask, NULL);
sigprocmask(SIG_SETMASK, &oldmask, NULL);
if (ret != 0)
pr_err("UNS: daemon exited abnormally\n");
......
......@@ -314,7 +314,7 @@ static int __userns_sysctl_op(void *arg, int proc_fd, pid_t pid)
kill(worker, SIGKILL);
goto out;
}
sigprocmask(SIG_BLOCK, &oldmask, NULL);
sigprocmask(SIG_SETMASK, &oldmask, NULL);
if (!WIFEXITED(status) || WEXITSTATUS(status)) {
pr_err("worker failed: %d\n", status);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment