[LUAU] How do you delete over 500,000 files in a directory

Jim Thompson jim at netgate.com
Thu Nov 3 19:23:32 PST 2005


Tim Newsham wrote:

>>> You'd think that by 2005, arbitrary length command lines wouldn't
>>> be an issue
>>
>
> [...]
>
>> Note that the expansion itself is no problem, rather it's almost 
>> always an exec(2) system call which fails returning E2BIG.
>> Remember that all that crap has to be copied into kernel space for an 
>> exec
>
> [...]
>
> All true, but hardly a good excuse.  They could allow arbitrary sized 
> argument vectors and environment and argument storage.  

This really slows down "exec()", which is why its still present.

> E2BIG on
> "rm *" on a machine with 2G of ram is pure silliness.  There are systems
> (as I pointed out) that don't have this limitation.

I googled for a while and couldn't find much in the way of p9's arg 
processing.  (I am unfamiliar with p9 in general.)

Thus, I can't say if p9 has limits (other than the size of physical 
memory, and some must be available for the newly execed program) or not.

I'll just have to trust you.

Jim




More information about the LUAU mailing list