Re: Cap command size passed to subshell
- From: Pavel Tsekov <ptsekov gmx net>
- To: Leonard den Ottolander <leonard den ottolander nl>
- Cc: MC Devel <mc-devel gnome org>
- Subject: Re: Cap command size passed to subshell
- Date: Thu, 25 Nov 2004 12:51:14 +0200
Hello,
On Sun, 21 Nov 2004, Leonard den Ottolander wrote:
> Hi,
>
> A small fix for the size of the command passed to the subshell pty. 4096
> bytes should be enough, right? I believe the compiler should optimize
> the double call to strlen(command) away. If not we could introduce an
> extra variable here and set it first.
Why is this patch necessary ? Besides the comment in the source code do
you have any proof (testcase) that long commands cause breakage ? Is
it the strlen () call or the pseudo-terminal device or the underlying
shell that fails ? I think if we opt to fix that part of the code, we
have to find out which part of the chain fails and find a proper
workaround i.e. for example passing the big string in smaller chunks. Just
removing a part of the command is obviously not what the user wants -
its better to warn her that she is passing a command which is too
long and just discard the whole command.
Any thoughts ?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]