diff options
Diffstat (limited to 'man2/unshare.2')
-rw-r--r-- | man2/unshare.2 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/man2/unshare.2 b/man2/unshare.2 index 229e065c8..58d57a86b 100644 --- a/man2/unshare.2 +++ b/man2/unshare.2 @@ -496,7 +496,7 @@ commands shows that the two shells are in different mount namespaces. .\" SRC BEGIN (unshare.c) .EX /* unshare.c - +\& A simple implementation of the unshare(1) command: unshare namespaces and execute a command. */ @@ -506,7 +506,7 @@ commands shows that the two shells are in different mount namespaces. #include <stdio.h> #include <stdlib.h> #include <unistd.h> - +\& static void usage(char *pname) { @@ -522,14 +522,14 @@ usage(char *pname) fprintf(stderr, " \-U unshare user namespace\en"); exit(EXIT_FAILURE); } - +\& int main(int argc, char *argv[]) { int flags, opt; - +\& flags = 0; - +\& while ((opt = getopt(argc, argv, "CimnptuU")) != \-1) { switch (opt) { case \[aq]C\[aq]: flags |= CLONE_NEWCGROUP; break; @@ -543,13 +543,13 @@ main(int argc, char *argv[]) default: usage(argv[0]); } } - +\& if (optind >= argc) usage(argv[0]); - +\& if (unshare(flags) == \-1) err(EXIT_FAILURE, "unshare"); - +\& execvp(argv[optind], &argv[optind]); err(EXIT_FAILURE, "execvp"); } |