Re: #! incompatible -- binfmt_script.c broken?

From: Matthias Andree (matthias.andree@gmx.de)
Date: Wed Dec 04 2002 - 13:37:10 EST


On Wed, 04 Dec 2002, Alex Riesen wrote:

> > SuSE Linux 7.0, 7.3, 8.1 (2.4.19 kernel, binfmt_script.c identical to
> > 2.4.20 BK):
> > $ /tmp/try.pl
> > /bin/sh: -- # -*- perl -*- -T: invalid option
>
> looks correct.

Nope. It cannot be correct if it breaks compatibility without giving us
any advantage.

> The interpreter (/bin/sh) has got everything after
> its name. IOW: "-- # -*- perl -*- -T"

Yes, as SINGLE argument. Therefore, Perl programs break if they use this
procedure recommended by "man perlrun".

I don't care WHY it works everywhere else, I want this incompatibility
fixed and I'm not going through a flame war as with the 4.4BSD
SIOCGIFNETMASK issue again. This is not negotiable.

BTW, 2.2 is also affected.

Think of someone using /usr/bin/env -i /path/to/program -- won't work on
Linux, but works on FreeBSD.

I cannot see technical reasons why this should remain unfixed.

We have enough braindead frivulous incompatibilities in Linux.

> It's just solaris' shell (/bin/sh) just ignores options starting with
> "--". And freebsd's as well.
> Anyway - it's bash, not the bin_fmt.

Nope, zsh as /bin/sh complains as well:

/bin/sh: no such option: # _*_ perl _*_ _T

so does pdksh:

/bin/sh: /bin/sh: --: unknown option

-
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 : Sat Dec 07 2002 - 22:00:19 EST