Re: binfmt_script and ^M

From: Ondrej Sury (sury.ondrej@globe.cz)
Date: Wed Mar 07 2001 - 03:29:22 EST


Sean Hunter <sean@dev.sportingbet.com> writes:

> I propose
> /proc/sys/kernel/im_too_lame_to_learn_how_to_use_the_most_basic_of_unix_tools_so_i_want_the_kernel_to_be_filled_with_crap_to_disguise_my_ineptitude

Well, too me it seems that you are intolerant.

I think that it should not be added to kernel because:

#!/bin/sh
/usr/bin/perl^M

will write

--
: No such file or directory
--
(in real it writes '/usr/bin/perl<CR>: No such file or directory')

But what I do think is that more meaningful message should be printed to output, because it is not only ^M issue. You could mistype name of interpreter and don't notice (/usr/bin/eprl or similar typos), and printing message saying 'script.pl: file not found' is confusing.

I see problem somewhere else. There are editors and viewers (for example midnight commander) which will hide ^M from you, and left you totally confused (that's why I am using emacs ;-), because you have no idea why it doesn't work, because everything seems ok with this _broken_ behaviour. This is really BAD thing.

And even more BAD thing is the intolerance shown in this thread. People are not morons just because they don't understand confusing message which shell gives them. Behaviour of kernel is good, error message is wrong. What should be fixed is error message.

-- Ondřej Surý <ondrej@globe.cz> Globe Internet s.r.o. http://globe.cz/ Tel: +420235365000 Fax: +420235365009 Pláničkova 1, 162 00 Praha 6 Mob: +420605204544 ICQ: 24944126 Mapa: http://globe.namape.cz/ GPG fingerprint: CC91 8F02 8CDE 911A 933F AE52 F4E6 6A7C C20D F273 - 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/



This archive was generated by hypermail 2b29 : Wed Mar 07 2001 - 21:00:22 EST