[lkml]   [2001]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: binfmt_script and ^M
On Tue, Feb 27, 2001 at 01:44:08PM +0000, Alan Cox 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).

> Fix the script. The kernel expects a specific format

How about letting the kernel return ENOEXEC instead of ENOENT? It would
give the luser just the little extra hint about converting their files to
Unix format.

$ ls
$ head -1 testscript
$ ./testscript
bash: ./testscript: No such file or directory


$ ./testscript
bash: ./testscript: Exec format error

I haven't got a clue what Posix requires though.

Erik Hensema (
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.136 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site