[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Finding the dump
From: |
Daniel Colascione |
Subject: |
Re: Finding the dump |
Date: |
Sun, 27 Jan 2019 17:06:15 -0800 |
User-agent: |
SquirrelMail/1.4.23 [SVN] |
>> 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.
- Re: Finding the dump, (continued)
- Re: Finding the dump, Andreas Schwab, 2019/01/27
- Re: Finding the dump, Eli Zaretskii, 2019/01/27
- Re: Finding the dump, Andreas Schwab, 2019/01/27
- Re: Finding the dump, Eli Zaretskii, 2019/01/27
- Re: Finding the dump, Andreas Schwab, 2019/01/27
- Re: Finding the dump, Daniel Colascione, 2019/01/27
- Re: Finding the dump, Andreas Schwab, 2019/01/27
- Re: Finding the dump, Stefan Monnier, 2019/01/27
- Re: Finding the dump, Daniel Colascione, 2019/01/27
- Re: Finding the dump, Stefan Monnier, 2019/01/27
- Re: Finding the dump,
Daniel Colascione <=
- Re: Finding the dump, Andreas Schwab, 2019/01/27
- Re: Finding the dump, Daniel Colascione, 2019/01/27
- Re: Finding the dump, Andreas Schwab, 2019/01/27
- Re: Finding the dump, Paul Eggert, 2019/01/27
- Re: Finding the dump, Daniel Colascione, 2019/01/27
- Re: Finding the dump, Paul Eggert, 2019/01/27
- Re: Finding the dump, Daniel Colascione, 2019/01/27
- Re: Finding the dump, Richard Stallman, 2019/01/28
- Re: Finding the dump, Paul Eggert, 2019/01/28
- Re: Finding the dump, Stefan Monnier, 2019/01/28