emacs-devel
[Top][All Lists]
Advanced

[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 11:27:52 -0800
User-agent: SquirrelMail/1.4.23 [SVN]

> On Jan 27 2019, "Daniel Colascione" <address@hidden> wrote:
>
>> There's some confusion on this thread. argv[0] *is* reliable
>
> Nope.  The caller can set argv[0] to any string.  It is in not required
> to be related to the name of the executable in any way.

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.

>> 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]