Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Oct 2002 03:40:08 -0700 (PDT)
From:      Peter Pentchev <roam@ringlet.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: misc/44195: globbing/argument limits
Message-ID:  <200210181040.g9IAe8QZ013175@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR misc/44195; it has been noted by GNATS.

From: Peter Pentchev <roam@ringlet.net>
To: abc@anchorageinternet.org
Cc: bug-followup@FreeBSD.org
Subject: Re: misc/44195: globbing/argument limits
Date: Fri, 18 Oct 2002 13:36:36 +0300

 --GFPlsJ7YtLjXgs8j
 Content-Type: text/plain; charset=windows-1251
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Fri, Oct 18, 2002 at 05:40:09AM +0000, abc@anchorageinternet.org wrote:
 >=20
 > >Number:         44195
 > >Category:       misc
 > >Synopsis:       globbing/argument limits
 > >Originator:     Joe Public
 > >Release:        i386 FreeBSD 4.7-RELEASE
 > >Organization:
 > no org
 > >Environment:
 > ^^^^^^^^^^^^^^^^^^^^^^^^
 > >Description:
 > argument limits painful to users in days of 100GB drives.
 > >How-To-Repeat:
 > try a command and give it a few thousand arguments,
 
 It is not a matter of how many arguments you give to a command, it is
 simply a matter of how *long* the command line becomes.  Lugging around
 a multimegabyte command line buffer through shells, execv() system calls
 and such would be a *major* strain on your system.
 
 > like in file modifying command a folder with 6000 files.
 > find(1) is too slow, and combining it with xargs is a kludge.
 
 If you mean that 'find -exec' is too slow, then I would argue that using
 -exec is the kludge, when xargs(1) is available.  I am pretty sure that
 the find(1) and xargs(1) utilities were actually developed together,
 with a common goal in mind, that goal being *exactly* processing of
 multiple files in one go.
 
 The -exec primary to find(1) is extremely inefficient when dealing with
 many files - it spawns a new process for each file it finds, which, as
 you note, is too slow.  The xargs utility will do a much better job; I
 would be very interested in what exactly do you consider to be a kludge
 about it.
 
 > there has to be a better solution than imposing these
 > arbitrary limits on arguments.  user limits in /etc/login.conf,
 > or something like that, should be used to limit use of
 > utilities, not compiled-in defines.
 
 As explained above, the limits are not arbitrary, but governed by strict
 common sense when it comes to passing buffers both between userland
 utilities and through multiple crossings of the userland/kernel boundary
 in system calls.
 
 G'luck,
 Peter
 
 PS. This will very probably be my last post on this subject, and nobody
 should be surprised if this PR is closed very soon; what with the recent
 mailing list "activity", it scores big on my troll indicator.  I could
 be wrong, of course, but I'm just stating my opinion here.
 
 --=20
 Peter Pentchev	roam@ringlet.net	roam@FreeBSD.org
 PGP key:	http://people.FreeBSD.org/~roam/roam.key.asc
 Key fingerprint	FDBA FD79 C26F 3C51 C95E  DF9E ED18 B68D 1619 4553
 This would easier understand fewer had omitted.
 
 --GFPlsJ7YtLjXgs8j
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.0 (FreeBSD)
 
 iD8DBQE9r+Q07Ri2jRYZRVMRAjEmAJ9ZF0S/DEiWiTKSosxXzZ2xlHf0oQCdERmx
 1UahZ2drIfteCqMkWyC3GrM=
 =+snq
 -----END PGP SIGNATURE-----
 
 --GFPlsJ7YtLjXgs8j--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210181040.g9IAe8QZ013175>