mailing list of musl libc
 help / color / mirror / code / Atom feed
From: u-uy74@aetey.se
To: musl@lists.openwall.com
Subject: Re: Question about setting argv[0] when manually using dynamic linker
Date: Sun, 9 Jul 2017 16:04:26 +0200	[thread overview]
Message-ID: <20170709140426.GB27260@example.net> (raw)
In-Reply-To: <20170709122325.GK1627@brightrain.aerifal.cx>

On Sun, Jul 09, 2017 at 08:23:25AM -0400, Rich Felker wrote:
> On Sun, Jul 09, 2017 at 11:23:23AM +0200, u-uy74@aetey.se wrote:
> > What about always passing on the loader argv[0] unless --argv0 is present?
> > This will not matter for programs which do not analyze argv[0]
> > and will not make it worse for programs which do.
> 
> This would be a regression in existing behavior and basically breaks
> any scripts where the program run wants argv[0] to be its own name.

Indeed, this _can_ make it worse for programs run from existing scripts.
This makes my suggestion moot.

> Otherwise I agree it would be a nicer interface. But I don't see any
> reason your invoking program can't just pass the same string it passes
> as argv[0] at exec time also as the argument to --argv0.

Certainly it can, this just happens to be practically inconvenient.

Such a change needs some new config syntax, some coding, testing,
documentation and then modification and testing of a noticeable number of
configuration instances. Sigh. Given that the "existing scripts depending
on the old behaviour" are irrelevant here, it does not feel right. :)

Of course this is not an argument for upstream.

Never mind, we can either bite the bullet and use --argv0 as it is meant
to, or make the "pass-on" change to our copy of the dynloader.

Thanks (for musl and for --argv0) !
Rune



      reply	other threads:[~2017-07-09 14:04 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-17  0:38 John Regan
2017-05-17  9:01 ` u-uy74
2017-05-17 11:00   ` mzpqnxow
2017-05-17 16:07     ` mzpqnxow
2017-05-17 16:16       ` John Regan
2017-05-17 16:24         ` Rich Felker
2017-05-17 19:07           ` u-uy74
2017-05-17 19:16             ` John Regan
2017-05-17 21:10               ` u-uy74
2017-05-17 21:15               ` mzpqnxow
2017-05-17 21:22                 ` John Regan
2017-07-02 17:36           ` u-uy74
2017-07-04 20:58             ` Rich Felker
2017-07-05  6:01               ` u-uy74
2017-07-09  9:23               ` u-uy74
2017-07-09 12:23                 ` Rich Felker
2017-07-09 14:04                   ` u-uy74 [this message]

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=20170709140426.GB27260@example.net \
    --to=u-uy74@aetey.se \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).