Re: variable length argument support (was: [OT] Re: The vi editor causes brain damage)

2007-08-19 Thread Paolo Ornati
On Sun, 19 Aug 2007 15:07:01 +0200 (CEST)
Jan Engelhardt <[EMAIL PROTECTED]> wrote:

> >Remove the arg+env limit of MAX_ARG_PAGES by copying the strings
> >directly from the old mm into the new mm.  
> 
> Me wonders. Will that make the "checking for maximum length of command line
> arguments" from autotools run forever since execve() will not fail anymore?

Since I'm running Gentoo and do many compiles I can tell that it
works  :)

If I remeber correctly it was discussed on LKML and turend out that
that check is done starting with a "max" len and going down rather than
starting low and going up.

-- 
Paolo Ornati
Linux 2.6.23-rc3-g2a677896-dirty on x86_64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [OT] Re: The vi editor causes brain damage

2007-08-19 Thread Torsten Duwe
On Sunday 19 August 2007, Willy Tarreau wrote:
> On Sun, Aug 19, 2007 at 09:15:22AM +0200, Jiri Slaby wrote:
> > What does this have to do with rm command?
> Nothing, and no more with linux development. Marc confuses shell and rm.

> (please do not follow up on this OT thread, responses to /dev/null)

Then do not answer in the first place. Do not answer at all. There's tons of 
good literature that explains this. Don't feed the troll.

Torsten
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: variable length argument support (was: [OT] Re: The vi editor causes brain damage)

2007-08-19 Thread Jan Engelhardt

On Aug 19 2007 14:39, Paolo Ornati wrote:
>> WT> Under unix, the shell resolves "*" and passes the 1 file names
>> WT> to the "rm" command. Now, execve() may fail because 1 names in
>> WT> arguments can require too much memory. That's why find and xargs
>> WT> were invented!
>> 
>> It would be very handy if the argument memory space was expanded.
>> Many years ago I hit the limit regularly on Solaris, and going to
>> Linux with its comparatively large limit was a joy. Now it happens to
>> me quite often on Linux as well.
>> 
>
>done  :)
>
>commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
>Author: Ollie Wild <[EMAIL PROTECTED]>
>Date:   Thu Jul 19 01:48:16 2007 -0700
>
>mm: variable length argument support
>
>Remove the arg+env limit of MAX_ARG_PAGES by copying the strings
>directly from the old mm into the new mm.

Me wonders. Will that make the "checking for maximum length of command line
arguments" from autotools run forever since execve() will not fail anymore?



Jan
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [OT] Re: The vi editor causes brain damage

2007-08-19 Thread Paolo Ornati
On Sun, 19 Aug 2007 14:31:21 +0200
Benny Amorsen <[EMAIL PROTECTED]> wrote:

> > "WT" == Willy Tarreau <[EMAIL PROTECTED]> writes:
> 
> WT> Under unix, the shell resolves "*" and passes the 1 file names
> WT> to the "rm" command. Now, execve() may fail because 1 names in
> WT> arguments can require too much memory. That's why find and xargs
> WT> were invented!
> 
> It would be very handy if the argument memory space was expanded.
> Many years ago I hit the limit regularly on Solaris, and going to
> Linux with its comparatively large limit was a joy. Now it happens to
> me quite often on Linux as well.
> 

done  :)

commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
Author: Ollie Wild <[EMAIL PROTECTED]>
Date:   Thu Jul 19 01:48:16 2007 -0700

mm: variable length argument support

Remove the arg+env limit of MAX_ARG_PAGES by copying the strings
directly from the old mm into the new mm.

-- 
Paolo Ornati
Linux 2.6.23-rc3-g2a677896 on x86_64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [OT] Re: The vi editor causes brain damage

2007-08-19 Thread Benny Amorsen
> "WT" == Willy Tarreau <[EMAIL PROTECTED]> writes:

WT> Under unix, the shell resolves "*" and passes the 1 file names
WT> to the "rm" command. Now, execve() may fail because 1 names in
WT> arguments can require too much memory. That's why find and xargs
WT> were invented!

It would be very handy if the argument memory space was expanded.
Many years ago I hit the limit regularly on Solaris, and going to
Linux with its comparatively large limit was a joy. Now it happens to
me quite often on Linux as well.

What are the primary problems with expanding it? It used to be
swappable memory, is that still the case?


/Benny


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[OT] Re: The vi editor causes brain damage

2007-08-19 Thread Willy Tarreau
On Sun, Aug 19, 2007 at 09:15:22AM +0200, Jiri Slaby wrote:
> Marc Perkel napsal(a):
> > Let me give you and example of the difference between
> > Linux open source world brain damaged thinking and
> > what it's like out here in the real world.
> > 
> > Go to a directory with 10k files and type:
> > 
> > rm *
> > 
> > What do you get?
> > 
> > /bin/rm: Argument list too long
> 
> What does this have to do with rm command?

Nothing, and no more with linux development. Marc confuses shell and rm.
Under DOS, when he types "del *", the shell calls the builtin function
"del" and passes it only one argument "*". The del function is then
responsible for iterating through the files using getfirst/getnext.

This is also why mostly only builtin shell commands support "*", while
most external commands do not support it, since they have to re-implement
the same code to iterate through the files (try "debug c*.com", it will
not work).

Under unix, the shell resolves "*" and passes the 1 file names to
the "rm" command. Now, execve() may fail because 1 names in arguments
can require too much memory. That's why find and xargs were invented!

The solution is easy : find . -maxdepth 1 | xargs rm

So this has nothing to do with rm, nor with rm being open-source, and
even less with rm being written with vi, and Marc's rant is totally
wrong and off-topic. Maybe he was drunk when posting, or maybe someone
used his keyboard to make him look like a complete fool. Or maybe he
really is.

Willy
(please do not follow up on this OT thread, responses to /dev/null)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[OT] Re: The vi editor causes brain damage

2007-08-19 Thread Willy Tarreau
On Sun, Aug 19, 2007 at 09:15:22AM +0200, Jiri Slaby wrote:
 Marc Perkel napsal(a):
  Let me give you and example of the difference between
  Linux open source world brain damaged thinking and
  what it's like out here in the real world.
  
  Go to a directory with 10k files and type:
  
  rm *
  
  What do you get?
  
  /bin/rm: Argument list too long
 
 What does this have to do with rm command?

Nothing, and no more with linux development. Marc confuses shell and rm.
Under DOS, when he types del *, the shell calls the builtin function
del and passes it only one argument *. The del function is then
responsible for iterating through the files using getfirst/getnext.

This is also why mostly only builtin shell commands support *, while
most external commands do not support it, since they have to re-implement
the same code to iterate through the files (try debug c*.com, it will
not work).

Under unix, the shell resolves * and passes the 1 file names to
the rm command. Now, execve() may fail because 1 names in arguments
can require too much memory. That's why find and xargs were invented!

The solution is easy : find . -maxdepth 1 | xargs rm

So this has nothing to do with rm, nor with rm being open-source, and
even less with rm being written with vi, and Marc's rant is totally
wrong and off-topic. Maybe he was drunk when posting, or maybe someone
used his keyboard to make him look like a complete fool. Or maybe he
really is.

Willy
(please do not follow up on this OT thread, responses to /dev/null)

-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [OT] Re: The vi editor causes brain damage

2007-08-19 Thread Benny Amorsen
 WT == Willy Tarreau [EMAIL PROTECTED] writes:

WT Under unix, the shell resolves * and passes the 1 file names
WT to the rm command. Now, execve() may fail because 1 names in
WT arguments can require too much memory. That's why find and xargs
WT were invented!

It would be very handy if the argument memory space was expanded.
Many years ago I hit the limit regularly on Solaris, and going to
Linux with its comparatively large limit was a joy. Now it happens to
me quite often on Linux as well.

What are the primary problems with expanding it? It used to be
swappable memory, is that still the case?


/Benny


-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [OT] Re: The vi editor causes brain damage

2007-08-19 Thread Paolo Ornati
On Sun, 19 Aug 2007 14:31:21 +0200
Benny Amorsen [EMAIL PROTECTED] wrote:

  WT == Willy Tarreau [EMAIL PROTECTED] writes:
 
 WT Under unix, the shell resolves * and passes the 1 file names
 WT to the rm command. Now, execve() may fail because 1 names in
 WT arguments can require too much memory. That's why find and xargs
 WT were invented!
 
 It would be very handy if the argument memory space was expanded.
 Many years ago I hit the limit regularly on Solaris, and going to
 Linux with its comparatively large limit was a joy. Now it happens to
 me quite often on Linux as well.
 

done  :)

commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
Author: Ollie Wild [EMAIL PROTECTED]
Date:   Thu Jul 19 01:48:16 2007 -0700

mm: variable length argument support

Remove the arg+env limit of MAX_ARG_PAGES by copying the strings
directly from the old mm into the new mm.

-- 
Paolo Ornati
Linux 2.6.23-rc3-g2a677896 on x86_64
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: variable length argument support (was: [OT] Re: The vi editor causes brain damage)

2007-08-19 Thread Jan Engelhardt

On Aug 19 2007 14:39, Paolo Ornati wrote:
 WT Under unix, the shell resolves * and passes the 1 file names
 WT to the rm command. Now, execve() may fail because 1 names in
 WT arguments can require too much memory. That's why find and xargs
 WT were invented!
 
 It would be very handy if the argument memory space was expanded.
 Many years ago I hit the limit regularly on Solaris, and going to
 Linux with its comparatively large limit was a joy. Now it happens to
 me quite often on Linux as well.
 

done  :)

commit b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
Author: Ollie Wild [EMAIL PROTECTED]
Date:   Thu Jul 19 01:48:16 2007 -0700

mm: variable length argument support

Remove the arg+env limit of MAX_ARG_PAGES by copying the strings
directly from the old mm into the new mm.

Me wonders. Will that make the checking for maximum length of command line
arguments from autotools run forever since execve() will not fail anymore?



Jan
-- 
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [OT] Re: The vi editor causes brain damage

2007-08-19 Thread Torsten Duwe
On Sunday 19 August 2007, Willy Tarreau wrote:
 On Sun, Aug 19, 2007 at 09:15:22AM +0200, Jiri Slaby wrote:
  What does this have to do with rm command?
 Nothing, and no more with linux development. Marc confuses shell and rm.

 (please do not follow up on this OT thread, responses to /dev/null)

Then do not answer in the first place. Do not answer at all. There's tons of 
good literature that explains this. Don't feed the troll.

Torsten
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: variable length argument support (was: [OT] Re: The vi editor causes brain damage)

2007-08-19 Thread Paolo Ornati
On Sun, 19 Aug 2007 15:07:01 +0200 (CEST)
Jan Engelhardt [EMAIL PROTECTED] wrote:

 Remove the arg+env limit of MAX_ARG_PAGES by copying the strings
 directly from the old mm into the new mm.  
 
 Me wonders. Will that make the checking for maximum length of command line
 arguments from autotools run forever since execve() will not fail anymore?

Since I'm running Gentoo and do many compiles I can tell that it
works  :)

If I remeber correctly it was discussed on LKML and turend out that
that check is done starting with a max len and going down rather than
starting low and going up.

-- 
Paolo Ornati
Linux 2.6.23-rc3-g2a677896-dirty on x86_64
-
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/