find:: get rid of nested function (it's a gcc-ism)
[oweals/busybox.git] / miscutils / setsid.c
index 60ee062e37e4a01880acf6b99ca1e7e8eda6c8f4..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;
@@ -45,6 +52,5 @@ int setsid_main(int argc UNUSED_PARAM, char **argv)
        }
 
        argv++;
-       BB_EXECVP(argv[0], argv);
-       bb_perror_msg_and_die("can't execute '%s'", argv[0]);
+       BB_EXECVP_or_die(argv);
 }