1234567891011121314151617181920212223242526272829303132333435 |
- #include "libbb.h"
- int setsid_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
- int setsid_main(int argc UNUSED_PARAM, char **argv)
- {
- if (!argv[1])
- bb_show_usage();
-
- if (getpgrp() == getpid())
- forkexit_or_rexec(argv);
- setsid();
- BB_EXECVP(argv[1], argv + 1);
- bb_simple_perror_msg_and_die(argv[1]);
- }
|