env bug ?
Henry Spencer
henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
Wed Mar 9 14:30:17 UTC 2005
On Tue, 8 Mar 2005, Peter L. Peres wrote:
> The command env parses its arguments wrong and tries to execute the
> first token it finds...
That is exactly correct behavior. env, like most programs, has no
business trying to parse its arguments at all -- that is the job of the
command interpreter which calls it. env is handed a vector of strings,
not a single string; the parsing is already done.
Command names and file names with spaces in them are *legitimate*
(although admittedly odd) and are not supposed to be broken up at the whim
of a random program.
The problem here is a combination of rather crude kernel code which is
doing a half-hearted job of parsing, and a user not realizing that using
more than one argument in a #! line is unwise.
Henry Spencer
henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list