8 int main(int argc, char **argv)
11 fprintf(stderr, "Usage: newns PROGRAM [ARGUMENTS ...]\n");
15 /* This is best-effort; if the kernel is too old (Linux << 2.6.16),
16 * or indeed if the kernel isn't Linux so we don't have
17 * unshare(CLONE_NEWNS), don't worry about it.
20 if (unshare(CLONE_NEWNS) < 0 && errno != ENOSYS)
21 perror("unshare failed");
22 /* ... but continue anyway */
23 #endif /* __linux__ */
24 setenv("OS_PROBER_NEWNS", "1", 1);
25 execvp(argv[1], argv + 1);
27 perror("execvp failed");