mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jamie Lokier <jamie@shareable.org>
To: Paul Jackson <pj@sgi.com>
Cc: hjlipp@web.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Linux 2.6: shebang handling in fs/binfmt_script.c
Date: Mon, 23 Feb 2004 14:22:15 +0000	[thread overview]
Message-ID: <20040223142215.GB30321@mail.shareable.org> (raw)
In-Reply-To: <20040222214457.6f8d2224.pj@sgi.com>

Paul Jackson wrote:
> > I believe the question was "which shell expects the name in argv[2]
> 
> The question is more like: examine each shell's argument parsing code to
> determine which ones will or will not be affected by this.  For a change
> like this, someone needs to actually look at the code for each major
> shell, and verify their reading of the code with a little experimentation.

Eh?  We do know what the major shells do: They either look at the
first non-option argument for the script name, or they do not accept
options at all.

Anyway that's irrelevant: the splitting change only affects shell
_scripts_ which already have multiple options on the #! line, and
which depend on a space not splitting the argument.  If a script
doesn't have that, the shell's behaviour isn't affected by this
change.

Such scripts are non-portable because that behaviour isn't universal
(although I have a feeling the current Linux behaviour was done to
mimick some existing system - as it was never hard to implement
argument splitting of the original author had wanted to.)

In other words, what's relevant is which shell _scripts_ would be
affected, not which shells.

To find those scripts, do:

    find /bin /sbin /usr/bin /usr/sbin /usr/X11R6/bin /usr/local/bin \
         /etc /usr/lib -type f \
    | xargs perl -ne 'print "$ARGV\n" if /^#! ?.+ .+ /; close ARGV'

(Or choose your own directories).

I didn't find any on my system.

-- Jamie

  reply	other threads:[~2004-02-23 14:22 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-16 13:34 Hansjoerg Lipp
2004-02-22 10:09 ` Paul Jackson
2004-02-22 15:54   ` Hansjoerg Lipp
2004-02-22 20:53     ` Paul Jackson
2004-02-22 22:57       ` Jamie Lokier
2004-02-23  5:44         ` Paul Jackson
2004-02-23 14:22           ` Jamie Lokier [this message]
2004-02-23 17:34             ` Andries Brouwer
2004-02-23 20:13               ` Paul Jackson
2004-02-23 21:46               ` Paul Jackson
2004-02-24  1:13                 ` Hansjoerg Lipp
2004-02-24  1:29                   ` Paul Jackson
2004-02-25 23:13                     ` Hansjoerg Lipp
2004-02-23 20:12             ` Paul Jackson
2004-02-23 20:16               ` Jamie Lokier
2004-02-23 22:08                 ` Paul Jackson
2004-02-23 20:25           ` Hansjoerg Lipp
2004-02-23 22:00             ` Paul Jackson
2004-02-23 23:59               ` Jamie Lokier
2004-02-24  0:13               ` Hansjoerg Lipp
2004-02-24  1:32                 ` Paul Jackson
2004-02-25 23:14                   ` Hansjoerg Lipp
2004-02-25 23:24                     ` Paul Jackson
2004-02-23 20:13       ` Hansjoerg Lipp
2004-02-23 22:24         ` Paul Jackson
2004-02-24  0:21           ` Hansjoerg Lipp
2004-02-23  5:49     ` Paul Jackson
2004-02-23  5:50     ` Paul Jackson
2004-02-23  5:42 ` Paul Jackson
2004-02-23 20:24   ` Hansjoerg Lipp
2004-02-23 21:55     ` Paul Jackson

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=20040223142215.GB30321@mail.shareable.org \
    --to=jamie@shareable.org \
    --cc=hjlipp@web.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.com \
    /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®