On Mon, 20 Oct 1997 11:05:56 +0300 (EET DST), I wrote:
:0
* condition
! address(_at_)one(_dot_)com address(_at_)two(_dot_)net
address(_at_)three(_dot_)org
I added a note about this to the FAQ. I also wrote that this will not
work too well when the list of recipients grows too long. But what
exactly is the limit here? I have on store a message from Wotan where
he asserts that `cat addresses.txt` could and did exceed LINEBUF by a
long shot, yet he didn't have any problems with it. (*)
It is also my understanding that a mere `cat file` will not spawn a
shell (as David Tamkin pointed out recently, as long as it doesn't
contain SHELLMETAS, it will not fire off a shell). So it's not the
shell's built-in maximum command-line lenght that limits this, either,
is it? (Uh, actually, this is a limit to how long the argument string
to execve(2) can be, correct? So you don't need a shell to be limited
by that. Right?)
Finally, it would be nice to learn of a way to find out how big
exactly this limit is. For purposes of the FAQ, I don't think I want
to set off people groping inside their limits.h, but I suppose that
would at least be one way to find out.
I'm assuming that this ARG_MAX constant is what sets the limit. What
I'd like to understand is why not (if indeed not) LINEBUF makes any
difference.
/* era */
$ ( echo '#include <limits.h>'; echo 'ARG_MAX' ) | cpp | tail -1
38912
(*) Notice the subtle assumption about the gender of somebody with the
same name as a Germanic male god. [WTF was harder to guess :-]
--
Paparazzi of the Net: No matter what you do to protect your privacy,
they'll hunt you down and spam you. <http://www.iki.fi/~era/spam/>