Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Nov 2000 01:15:59 +0100
From:      Sebastiaan van Erk <sebster@sebster.com>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: argument list too long
Message-ID:  <20001117011559.B3656@sebster.com>
In-Reply-To: <20001116154822.B18037@fw.wintelcom.net>; from bright@wintelcom.net on Thu, Nov 16, 2000 at 03:48:23PM -0800
References:  <20001116122313.A69018@sebster.com> <00111700205500.61931@shalimar.net.au> <20001116145641.A22842@sebster.com> <20001116105654.G830@fw.wintelcom.net> <20001116231731.A14470@c187104187.telekabel.chello.nl> <20001116143843.S830@fw.wintelcom.net> <20001117000816.B15150@c187104187.telekabel.chello.nl> <20001116152421.A18037@fw.wintelcom.net> <20001117004239.A3656@sebster.com> <20001116154822.B18037@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein wrote:

> > THEN what about Bob? Why don't you limit argument lists in the same
> > way that you limit users? The user allocates the list and passes
> > a pointer to it to execve? I don't see any reason for the kernel
> > ever needing to copy the list.
> 
> We limit the amount of memory a user can allocate.
> 
> See the manpage for limit.

That's what I'm saying!! I _KNOW_ limit! 
To quote myself:
                                       !!!!!
> > THEN what about Bob? Why don't you limit argument lists in the same
> > way that you limit users? The user allocates the list and passes
 
> I don't see how one could allocate all this memory and not have
> it happen.

See above.
 
> > Well I think it's not so silly to be able to do a tar `find / -name '*.jsp'`.
> 
> I do, there's tools to address this issue.

Yes, and there are bandages to cover wounds.
 
> So write a library to do so, it'll take you a lot more time than
> just using xargs.

xargs splits something up into multiple processes; so xargs is _not_
the solution to passing a long lists of arguments to a single process.

I'm just brainstorming here a little bit on what I think is a silly
restriction which I'm sure has it's historical reasons. And instead
of conceding that it would be BETTER to have argument lists be any
length, and it being BETTER to pass argument lists from file,
all I hear is "it's silly to try that, because it doesn't work".
It's the "lets keep it broke" attitude instead of a "let's fix it"
attitude that bothers me.

Basically, it's IMPOSSIBLE to write a library to do what I want to do,
because there's no way that I can get an unlimited number of args to
a program that doesn't have a --args-from option. So this is a
fundamental limitation of the OS.

Greetings,
Sebastiaan van Erk


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




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