diff options
author | JozanLeClerc <JozanLeClerc@noemail.net> | 2020-11-29 17:16:20 +0000 |
---|---|---|
committer | JozanLeClerc <JozanLeClerc@noemail.net> | 2020-11-29 17:16:20 +0000 |
commit | bada9b0ba2db5173cdb9b3bc507825a0deff2d80 (patch) | |
tree | ce02ccab8398db0bbabc6fe8051ea11cb4b99541 /src/c_bsdsetsid.c | |
parent | Seems relatively fine to me (diff) | |
download | bsdsetsid-bada9b0ba2db5173cdb9b3bc507825a0deff2d80.tar.gz bsdsetsid-bada9b0ba2db5173cdb9b3bc507825a0deff2d80.tar.bz2 bsdsetsid-bada9b0ba2db5173cdb9b3bc507825a0deff2d80.tar.xz bsdsetsid-bada9b0ba2db5173cdb9b3bc507825a0deff2d80.tar.zst bsdsetsid-bada9b0ba2db5173cdb9b3bc507825a0deff2d80.zip |
Added man, Makefile can install
FossilOrigin-Name: 345456287af27b824c56e03b1eeebd9f73fe6562
Diffstat (limited to '')
-rw-r--r-- | src/c_bsdsetsid.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/src/c_bsdsetsid.c b/src/c_bsdsetsid.c index 7d3a76d..f8e2067 100644 --- a/src/c_bsdsetsid.c +++ b/src/c_bsdsetsid.c @@ -39,7 +39,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * bsdsetsid: src/c_bsdsetsid.c - * Thu Nov 26 22:12:37 CET 2020 + * Sun Nov 29 16:42:26 CET 2020 * Joe * * This is the entrypoint of the program. @@ -51,39 +51,10 @@ #include <string.h> #include <unistd.h> +#include "c_args.h" #include "c_bsdsetsid.h" #include "c_fork.h" -static char -c_args -(int argc, - const char* argv[], - bool_t* wopt) -{ - if (argc == 1) { - dprintf( - STDERR_FILENO, - "%s: %s\n", - C_PROGNAME, - C_ERR_NOARG - ); - return (1); - } - if (strncmp(argv[1], C_W_OPT, 3) == 0) { - *wopt = TRUE; - if (argc == 2) { - dprintf( - STDERR_FILENO, - "%s: %s\n", - C_PROGNAME, - C_ERR_NOARG - ); - return (1); - } - } - return (0); -} - int main (int argc, @@ -93,9 +64,7 @@ main bool_t wopt; wopt = FALSE; - if (c_args(argc, argv, &wopt) != 0) { - return (EXIT_FAILURE); - } + c_args(argc, argv, &wopt); c_fork(argv, envp, wopt); return (EXIT_SUCCESS); } |