From 1cba62abdafee8de768ffb33c2edbc7e5bec3ce1 Mon Sep 17 00:00:00 2001 From: James Youngman Date: Sun, 4 Dec 2005 02:53:08 +0000 Subject: [PATCH] Correctly display the size of the argument buffer we really allocated. --- xargs/xargs.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/xargs/xargs.c b/xargs/xargs.c index 9feab83e..355e4e9b 100644 --- a/xargs/xargs.c +++ b/xargs/xargs.c @@ -664,7 +664,18 @@ main (int argc, char **argv) (posix_arg_size_max - size_of_environment)); fprintf(stderr, _("Size of command buffer we are actually using: %ld\n"), - arg_size); + bc_ctl.arg_max); + + if (isatty(STDIN_FILENO)) + { + fprintf(stderr, + "\n" + "Execution of xargs will continue now, and it will " + "try to read its input and run commands; if this is " + "not what you wanted to happen, please type the " + "end-of-file keystroke.\n"); + } + } linebuf = (char *) xmalloc (bc_ctl.arg_max + 1);