Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <sched.h>
- #include <linux/sched.h>
- #include <unistd.h>
- int main() {
- int ret;
- if (ret = unshare(CLONE_NEWNS) != 0) {
- fprintf(stderr, "ERROR: unshare returned: %s\n", strerror(ret));
- _exit(1);
- }
- printf("unshared into new mount namespace\n");
- printf("sleeping for 1000\n");
- sleep(1000);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement