lkml.org 
[lkml]   [2001]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: binfmt_script and ^M
From
Date
Jesse Pollard <pollard@tomcat.admin.navo.hpc.mil> writes:

|> Andreas Schwab <schwab@suse.de>:Andreas Schwab <schwab@suse.de>Andreas Schwab <schwab@suse.de>
|> > Paul Flinders <paul@dawa.demon.co.uk> writes:
|> >
|> > |> Andreas Schwab wrote:
|> > |>
|> > |> > This [isspace('\r') == 1] has no significance here. The right thing to
|> > |>
|> > |> > look at is $IFS, which does not contain \r by default. The shell only splits
|> > |>
|> > |> > words by "IFS whitespace", and the kernel should be consistent with it:
|> > |> >
|> > |> > $ echo -e 'ls foo\r' | sh
|> > |> > ls: foo: No such file or directory
|> > |>
|> > |> The problem with that argument is that #!<interpreter> can be applied
|> > |> to more than just shells which understand $IFS, so which environment
|> > |> variable does the kernel pick?
|> >
|> > The kernel should use the same default value of IFS as the Bourne shell,
|> > ie. the same value you'll get with /bin/sh -c 'echo "$IFS"'. This is
|> > independent of any settings in the environment.
|> >
|> > |> It's a difficult one - logically white space should terminate the interpreter
|> >
|> > No, IFS-whitespace delimits arguments in the Bourne shell.
|>
|> IFS can be defined in the environment.

No, the shell won't import it.

Andreas.

--
Andreas Schwab "And now for something
SuSE Labs completely different."
Andreas.Schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.420 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site