From fcdad54fc2784ffde46a5a6e1952c01f35440c2e Mon Sep 17 00:00:00 2001 From: cgd Date: Tue, 13 Jul 1993 22:18:13 +0000 Subject: [PATCH] get rid of -f flag (and make it conform to posix) --- usr.bin/xargs/xargs.1 | 17 +---------------- usr.bin/xargs/xargs.c | 11 +++-------- 2 files changed, 4 insertions(+), 24 deletions(-) diff --git a/usr.bin/xargs/xargs.1 b/usr.bin/xargs/xargs.1 index cebb45dfcd2e..0df7e1f46a0a 100644 --- a/usr.bin/xargs/xargs.1 +++ b/usr.bin/xargs/xargs.1 @@ -41,7 +41,7 @@ xargs \- construct argument list(s) and execute utility. .SH SYNOPSIS .ft B -xargs [\-ft] [[\-x] \-n number] [\-s size] [utility [argument ...]] +xargs [\-t] [[\-x] \-n number] [\-s size] [utility [argument ...]] .ft R .SH DESCRIPTION The @@ -70,21 +70,6 @@ Any single character, including newlines, may be escaped by a backslash. .PP The options are as follows: .TP -\-f -Force -.I xargs -to ignore the exit status returned by -.IR utility . -By default, -.I xargs -will exit immediately if -.I utility -exits with a non-zero exit status. -This does not include ignoring -.I utility -exiting due to a signal or without calling -.IR exit (2). -.TP \-n number Set the maximum number of arguments taken from standard input for each invocation of the utility. diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index e4d3a234a8a9..32ac4f6530b7 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -54,7 +54,7 @@ static char sccsid[] = "@(#)xargs.c 5.11 (Berkeley) 6/19/91"; #include #include "pathnames.h" -int fflag, tflag; +int tflag; void err __P((const char *, ...)); void run(), usage(); @@ -85,11 +85,8 @@ main(argc, argv) nargs = 5000; nline = ARG_MAX - 4 * 1024; nflag = xflag = 0; - while ((ch = getopt(argc, argv, "fn:s:tx")) != EOF) + while ((ch = getopt(argc, argv, "n:s:tx")) != EOF) switch(ch) { - case 'f': - fflag = 1; - break; case 'n': nflag = 1; if ((nargs = atoi(optarg)) <= 0) @@ -288,15 +285,13 @@ run(argv) */ if (noinvoke || !WIFEXITED(status) || WIFSIGNALED(status)) exit(127); - if (!fflag && WEXITSTATUS(status)) - exit(WEXITSTATUS(status)); } void usage() { (void)fprintf(stderr, -"usage: xargs [-ft] [[-x] -n number] [-s size] [utility [argument ...]]\n"); +"usage: xargs [-t] [[-x] -n number] [-s size] [utility [argument ...]]\n"); exit(1); }