From 1bc2296bac00f7dd0ffc41494896da7a2b1689cb Mon Sep 17 00:00:00 2001 From: sin Date: Thu, 16 Jan 2014 10:56:13 +0000 Subject: [PATCH] Double NARGS I just ran a simple one-liner[1] to find the average filepath length on my system (absolute paths) and that came up with a value ~90 characters. Assume this is out by a factor of two, we still have potentially 5000 more arguments that we can put into the buffer. Surely one might run xargs(1) on something that is not a filename. We just choose to accomodate the common use-case as much as possible. [1] find / 2>/dev/null | awk '{print length($0)}' \ | awk '{a+=$1}END{print "average filepath length: ",a/NR}' --- xargs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xargs.c b/xargs.c index 59028f1..b70c158 100644 --- a/xargs.c +++ b/xargs.c @@ -9,7 +9,7 @@ #include "util.h" enum { - NARGS = 5000 + NARGS = 10000 }; static int inputc(void);