find:: get rid of nested function (it's a gcc-ism)
[oweals/busybox.git] / miscutils / setsid.c
index fd3283e30def9d2ae0a98396fab42f62bf7a1505..ad2c8a4de5bed83edbdd9374aa6e05a2a4ed1ba8 100644 (file)
  * - busyboxed
  */
 
+//usage:#define setsid_trivial_usage
+//usage:       "PROG ARGS"
+//usage:#define setsid_full_usage "\n\n"
+//usage:       "Run PROG in a new session. PROG will have no controlling terminal\n"
+//usage:       "and will not be affected by keyboard signals (Ctrl-C etc).\n"
+//usage:       "See setsid(2) for details."
+
 #include "libbb.h"
 
 int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
@@ -44,6 +51,6 @@ int setsid_main(int argc UNUSED_PARAM, char **argv)
                setsid();
        }
 
-       BB_EXECVP(argv[1], argv + 1);
-       bb_simple_perror_msg_and_die(argv[1]);
+       argv++;
+       BB_EXECVP_or_die(argv);
 }