[lkml]   [2001]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: binfmt_script and ^M
Heusden, Folkert van wrote:
> > 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?

IMHO, yes. This set of files were created on Windows, then zipped and
uploaded to a Linux server, unpacked. This does not change the \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)

You're right there.

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

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

> + if (cp - 1 == '\r') <------- *)

Ivo Timmermans
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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