This is the mail archive of the cygwin@sources.redhat.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: long command lines


On Mon, 29 Jan 2001, Daniel Barclay wrote:

> I thought GNU software tried to avoid arbitrary limit like that.  Shouldn't
> the only limit be virtual memory?  

The maximum length of the argument vector is typically determined by the
underlying OS kernel interface; even if your user-level software such
as the shell supports say 100 KB long argument vector, it's still limited 
by what the kernel limit is. In Cygwin's case, Windows limits the length,
not Cygwin.

However, note that most (all?) exisiting OSs have these predefined limits
mostly for efficiency. The limits could be very large of course, or settable
at boot time, but it's there. The max number of open file descriptors is
one of the typical examples.

> That is, shouldn't bash keep reallocating (enlarging) its buffer until the
> pattern has been expanding, or until it runs out of memory?

Bash handles long command lines just fine.

Regards,
Mumit



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]