lkml.org 
[lkml]   [2001]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: binfmt_script and ^M
Date
> > When running a script (perl in this case) that has DOS-style newlines
> > (\r\n), Linux 2.4.2 can't find an interpreter because it doesn't
> > recognize the \r. The following patch should fix this (untested).
> _should_ it work with the \r in it?
IV> IMHO, yes. This set of files were created on Windows, then zipped and
IV> uploaded to a Linux server, unpacked. This does not change the \r.

But; it's not that much of hassle to run it trough some awk/sed/whatsoever
script, would it? Imho there should be as less as possible code in the
kernel which could've also been done in user-space.

> + if (cp - 1 == '\r') <------- *)
> There might be a problem with your patch: at the '*)': if the '\n' is the
> first character on the line, the cp-1 (which should be *(cp-1) I think)
IV> You're right there.

Phew, then I have at least 1 thing right in my message since I was wrong
with:

> would point before the buffer which can be un-allocated memory.

If only I had read the code myself :o)

IV> No, the first two characters are always `#!'.

Yes, absolutely right.
-
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:28    [W:0.048 / U:23.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site