mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Chris Adams <cmadams@hiwaay.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: #! incompatible -- binfmt_script.c broken?
Date: Thu, 05 Dec 2002 13:50:18 +0100	[thread overview]
Message-ID: <jebs40635h.fsf@sykes.suse.de> (raw)
In-Reply-To: <20021205121250.GE15405@merlin.emma.line.org> (Matthias Andree's message of "Thu, 5 Dec 2002 13:12:50 +0100")

Matthias Andree <matthias.andree@gmx.de> writes:

|> On Wed, 04 Dec 2002, Chris Adams wrote:
|> 
|> > 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).
|> 
|> That's correct. But how do you derive that the sh command line must
|> behave the same? The sh command is not the sh special built-in.
|> 
|> However, it would be reasonable if a /bin/sh set $1 to be "-- xyzzy" if
|> a file "foo" with
|> 
|> #! /bin/sh -- xyzzy
|> 
|> was executed (as path = [/bin/sh] argv = [./foo] [-- xyzzy]);
|> and although I didn't check, I wonder how shells without the "--" long
|> options parse that line.

POSIX is quite clear about that: only "--" as a single argument is
defined, other uses are undefined.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-05  2:59 Chris Adams
2002-12-05 12:12 ` Matthias Andree
2002-12-05 12:50   ` Andreas Schwab [this message]
     [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=jebs40635h.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=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

Powered by JetHome