2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 13:58:34 +00:00

test: static/sk-unix-mntns -- Check if unshare successed

Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Cyrill Gorcunov
2018-09-19 14:50:32 +03:00
committed by Andrei Vagin
parent 15e6662472
commit dbdd19fa1b

View File

@@ -53,7 +53,10 @@ int main(int argc, char *argv[])
}
if (pid == 0) {
unshare(CLONE_NEWNS);
if (unshare(CLONE_NEWNS)) {
pr_perror("unshare");
return 1;
}
if (mount(NULL, "/", NULL, MS_PRIVATE | MS_REC, NULL)) {
pr_perror("mount");
return 1;