lkml.org 
[lkml]   [1999]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: #!perl - alternative path to script interpreters - patch to 2.2

> Under different OS you will not have your hack in the kernel, so
> your solution has *less* chances to work there (zero, to be precise).

But script written under different OS will work under linux without
change.

> > It is more elegant to treat word after #! as a name of language...
> It is *completely* non-portable. Moreover, it will be useless for
> situations when different names are used for different versions of
> aforementioned awk (gawk vs. mawk). If you have permissions to tweak
> sysctls (aka /proc/sys) you have permissions to create a symlink.

Script may specify /opt/new-language/bin/sth while your comp may not
have /opt directory tree at all - its ugly. This patch provides
centralized way to redirect interpreter execution.
It takes about 300 bytes (code overhead is smaller).

> > This patch also fixes problems with scripts that come from DOS environment
> > ('\r\n' as line delimiter).
> Erm??? That is, instead of tr -d "\015" in userland where it..

OK. But you have to change script. More: you have to know nature of a
problem (to remove '\r') - kernel will not tell you what is going wrong.

I know that functionality provided by this patch is limited, but it is
also very small.

JB



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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