]> git.wh0rd.org - home.git/blobdiff - vunshare.c
cros-board: update
[home.git] / vunshare.c
index 2e7efbbb85415fe15ad637e1baebf6576476d6ed..96fe7a35b677a3b24c6d7baae6222160591730d6 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 /* TODO:
- * - Add userns support.
  * - Make pidns init optional.
  * - Make setproctitle nicer and include program argv[0].
  * - Set up prctl(PR_SET_PDEATHSIG).
@@ -195,7 +194,7 @@ static void setup_signal_handler(pid_t pid)
 
        child_pid = pid;
 
-       for (i = 1; i < SIGUNUSED; ++i)
+       for (i = 1; i < SIGRTMIN; ++i)
                if (sigaction(i, &sa, NULL) && errno != EINVAL)
                        fprintf(stderr, "sigaction(%i) failed: %s\n", i, strerror(errno));
        for (i = SIGRTMIN; i <= SIGRTMAX; ++i)
@@ -288,7 +287,18 @@ static const struct option opts[] = {
 
 static void usage(void)
 {
-       puts("Usage: unshare [options] <program>");
+       puts(
+               "Usage: unshare [options] <program>\n"
+               "\n"
+               "Options: [DimnpuU]\n"
+               "  -i   Use IPC namespaces\n"
+               "  -m   Use mount namespaces\n"
+               "  -n   Use net namespaces\n"
+               "  -p   Use pid namespaces\n"
+               "  -u   Use UTS namespaces\n"
+               "  -U   Use user namespaces\n"
+               "  -D   Daemonize program"
+       );
        exit(EX_USAGE);
 }