Re: [PATCH] Linux 2.6: shebang handling in fs/binfmt_script.c

From: Paul Jackson
Date: Sun Feb 22 2004 - 05:08:51 EST


In addition to the incompatible changes you note:
1) "#! cmd x y" to pass single arg "x y" with embedded space broken
2) Use of '\' char changed
3) Handling of long line changed
doesn't this also
4) risk breaking shells that look to argv[2] for the name of the
shell script file for error messages? This argument
has moved out to argv[argc-1], for some value of argc.

I'll wager you have to make a better case for this than simply:

As I'm really missing this feature in Linux and changing this
would not break any (unless ...

before the above incompatibilities in a critical piece of code are
overcome with the compelling need to change these details.

Perhaps you can handle any such special argument specification by
wrapping the user level command, as in:

Instead of:

#!/usr/bin/awk -F \t -f
... my awk code ...

rather do:

#!myawk
... my awk code ...

where myawk is a compiled program that essentially does

/usr/bin/awk -F '\t' -f argv[2]

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/