Re: Cap command size passed to subshell



Hello,

On Thu, 25 Nov 2004, Leonard den Ottolander wrote:

> Hello Pavel,
>
> On Thu, 2004-11-25 at 11:51, Pavel Tsekov wrote:
> > Why is this patch necessary ? Besides the comment in the source code do
> > you have any proof (testcase) that long commands cause breakage ?
>
> I haven't actually tried to crash mc with a long command, but the
> comment clearly indicates mc "goes comma" (sic) with large command
> lines, so I don't doubt that comment.

You better double check. What I mean - this comment may be as old as MC
itself. Things for sure have changed from that time. I suspect that this
comment refers to some kind of problems with the pseudo-terminal on some
particular platform. Unfortunately, the comment does not give any details.

> Since I haven't tested this the size cap of 4k is a bit arbitrary, but
> it seems a reasonable size and is well below the indicated estimated 8k
> size limit.

My objection here is that you actually truncate a valid command that the
user have typed. 8K or not he sometimes typed it and it is being truncated
without no warning at all, silently. This may result in aa unexpected
behaviour (from the users's point of view).



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]