From: "Daniel Colascione" <dancol@dancol.org>
To: "Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Finding the dump
Date: Sun, 27 Jan 2019 17:06:15 -0800 [thread overview]
Message-ID: <851e8d027a48752a60831a7e5c3fa3da.squirrel@dancol.org> (raw)
In-Reply-To: <jwv7eepvqmm.fsf-monnier+emacs@gnu.org>
>> Sure, but such callers are holding it wrong. If you set argv[0] to some
>> random string unrelated to Emacs, you break startup. That's fine.
>
> Indeed, this is sufficiently rare in my experience that I wouldn't worry
> about that case.
>
>>>> every system I've seen. Here's the algorithm: look at argv[0]: if it's
>>>> not an absolute path, make it absolute by prepending the startup CWD.
>>> If the executable is found on $PATH then argv[0] is *not* relative to
>>> CWD.
>> In that case, argv[0] will be absolute.
>
> That's not what I'm seeing on my system.
> When I type `emacs` into my shell (zsh under Debian), it is started with
> `emacs` as argv[0] and not with an absolute file name.
Ah, in my tests, the path to the program run becomes absolute during
shebang execution. For a raw executable, it's indeed pathless, but a
search should PATH should solve that problem. That's what Emacs does today
in init_cmdargs.
next prev parent reply other threads:[~2019-01-28 1:06 UTC|newest]
Thread overview: 81+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 13:15 Finding the dump Stefan Monnier
2019-01-23 13:46 ` Robert Pluim
2019-01-23 15:13 ` Stefan Monnier
2019-01-23 13:55 ` Andreas Schwab
2019-01-23 15:17 ` Stefan Monnier
2019-01-23 15:37 ` Andreas Schwab
2019-01-23 15:44 ` Andreas Schwab
2019-01-23 16:07 ` Stefan Monnier
2019-01-23 15:50 ` Eli Zaretskii
2019-01-23 16:02 ` Stefan Monnier
2019-01-23 16:04 ` Paul Eggert
2019-01-23 16:38 ` Robert Pluim
2019-01-23 17:24 ` Eli Zaretskii
2019-01-26 12:17 ` Eli Zaretskii
2019-01-26 15:03 ` Andreas Schwab
2019-01-26 15:12 ` Eli Zaretskii
2019-01-26 15:44 ` Andreas Schwab
2019-01-26 17:02 ` Eli Zaretskii
2019-01-26 20:44 ` Andreas Schwab
2019-01-27 15:20 ` Eli Zaretskii
2019-01-27 15:46 ` Andreas Schwab
2019-01-27 15:59 ` Eli Zaretskii
2019-01-27 16:37 ` Andreas Schwab
2019-01-27 16:56 ` Eli Zaretskii
2019-01-27 17:00 ` Andreas Schwab
2019-01-27 18:26 ` Daniel Colascione
2019-01-27 18:46 ` Andreas Schwab
2019-01-27 18:58 ` Stefan Monnier
2019-01-27 19:27 ` Daniel Colascione
2019-01-27 19:42 ` Stefan Monnier
2019-01-28 1:06 ` Daniel Colascione [this message]
2019-01-27 20:12 ` Andreas Schwab
2019-01-27 21:25 ` Daniel Colascione
2019-01-27 21:37 ` Andreas Schwab
2019-01-27 23:47 ` Paul Eggert
2019-01-28 0:32 ` Daniel Colascione
2019-01-28 1:21 ` Paul Eggert
2019-01-28 1:29 ` Daniel Colascione
2019-01-28 19:03 ` Richard Stallman
2019-01-28 19:23 ` Paul Eggert
2019-01-28 23:09 ` Stefan Monnier
2019-01-29 8:50 ` Richard Stallman
2019-01-31 2:21 ` Paul Eggert
2019-02-01 0:23 ` Richard Stallman
2019-02-01 2:09 ` Paul Eggert
2019-02-02 3:25 ` Richard Stallman
2019-02-02 7:23 ` Eli Zaretskii
2019-02-03 4:36 ` Richard Stallman
2019-02-01 7:22 ` Eli Zaretskii
2019-02-02 3:25 ` Richard Stallman
2019-02-02 7:22 ` Eli Zaretskii
2019-02-03 4:36 ` Richard Stallman
2019-01-28 3:38 ` Eli Zaretskii
2019-01-28 4:13 ` Paul Eggert
2019-01-28 6:28 ` Daniel Colascione
2019-01-28 15:35 ` Eli Zaretskii
2019-01-28 15:57 ` Paul Eggert
2019-01-28 16:02 ` Daniel Colascione
2019-01-28 17:39 ` Paul Eggert
2019-01-28 19:46 ` Daniel Colascione
2019-01-28 8:53 ` Stefan Monnier
2019-01-28 12:57 ` Fu Yuan
2019-01-28 15:41 ` Eli Zaretskii
2019-01-28 18:20 ` Stefan Monnier
2019-01-28 19:53 ` Eli Zaretskii
2019-01-28 22:30 ` Stefan Monnier
2019-01-27 9:55 ` Stefan Monnier
2019-01-27 10:32 ` Andreas Schwab
2019-01-27 10:44 ` Stefan Monnier
2019-01-27 10:54 ` Andreas Schwab
2019-01-27 15:33 ` Eli Zaretskii
2019-01-27 18:52 ` Stefan Monnier
2019-01-27 19:25 ` Eli Zaretskii
2019-01-27 18:47 ` Stefan Monnier
2019-01-26 17:27 ` Michael Heerdegen
2019-01-26 17:29 ` Eli Zaretskii
2019-01-26 18:05 ` Michael Heerdegen
2019-01-26 18:13 ` Eli Zaretskii
2019-01-26 20:05 ` Michael Heerdegen
2019-01-26 20:43 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2019-01-30 3:00 Van L
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=851e8d027a48752a60831a7e5c3fa3da.squirrel@dancol.org \
--to=dancol@dancol.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).