mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chris Adams <cmadams@hiwaay.net>
To: linux-kernel@vger.kernel.org
Subject: Re: #! incompatible -- binfmt_script.c broken?
Date: Wed, 4 Dec 2002 20:59:45 -0600	[thread overview]
Message-ID: <20021204205945.A233182@hiwaay.net> (raw)

Once upon a time, Matthias Andree <matthias.andree@gmx.de> said:
>Nope. It cannot be correct if it breaks compatibility without giving us
>any advantage.

Compatibility with _what_?  Linux works exactly the same as Tru64 Unix
for example - it supplies everything after the program to execute as the
first argument.  Are you going to make the kernel honor the setting of
the IFS environment variable?  Should it split only on space?  What
about tab?  Or $LANG (maybe space is different in different character
sets)?

The difference is that Tru64's /bin/sh (and /usr/bin/posix/sh and
/usr/bin/ksh) stops processing the argument and continues without error
after it hits a (single or double) dash and a space, while bash (and
pdksh and ash and zsh) don't handle that.

Try the following under your shell.  On Solaris and Tru64 sh and ksh, it
is handled with no error.  Under bash (on Linux, Solaris, and Tru64), it
returns an error:

$ set "-- xyzzy"
$ echo $?

According to SUSv3, bash is not compliant, because for set, under the
section "CONSEQUENCES OF ERRORS" is listed "None." and the "EXIT STATUS"
is "Zero."

Fix the shell(s).
-- 
Chris Adams <cmadams@hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.

             reply	other threads:[~2002-12-05  2:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-05  2:59 Chris Adams [this message]
2002-12-05 12:12 ` Matthias Andree
2002-12-05 12:50   ` Andreas Schwab
     [not found] <matthias.andree@gmx.de>
2002-12-04 11:34 ` Matthias Andree
2002-12-04 14:26   ` Alex Riesen
2002-12-04 15:23     ` Matthew Garrett
2002-12-04 18:37     ` Matthias Andree
2002-12-04 20:37       ` Matthew Garrett
2002-12-04 22:28         ` H. Peter Anvin
2002-12-05 11:55         ` Matthias Andree
2002-12-05  0:42     ` Horst von Brand
2002-12-05 11:38       ` Matthias Andree
2002-12-04 22:25   ` Andries Brouwer
2002-12-05  0:10   ` Horst von Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021204205945.A233182@hiwaay.net \
    --to=cmadams@hiwaay.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®