[hackers] [sbase] Double NARGS || sin
commit 1bc2296bac00f7dd0ffc41494896da7a2b1689cb
Author: sin <sin_AT_2f30.org>
Date: Thu Jan 16 10:56:13 2014 +0000
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}'
diff --git a/xargs.c b/xargs.c
index 59028f1..b70c158 100644
--- a/xargs.c
+++ b/xargs.c
_AT_@ -9,7 +9,7 @@
#include "util.h"
enum {
- NARGS = 5000
+ NARGS = 10000
};
static int inputc(void);
Received on Thu Jan 16 2014 - 12:01:38 CET
This archive was generated by hypermail 2.3.0
: Thu Jan 16 2014 - 12:12:12 CET