Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `pwd -P` with systemd-homed causes inconsistent cwd state
- X-seq: zsh-workers 52239
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Kyle Laker <kyle@laker.email>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: `pwd -P` with systemd-homed causes inconsistent cwd state
- Date: Sun, 22 Oct 2023 11:59:51 -0700
- Archived-at: <https://zsh.org/workers/52239>
- In-reply-to: <e3adbc41-1cba-46d7-99a7-552a14882c59@laker.email>
- List-id: <zsh-workers.zsh.org>
- References: <f31c3d78-11de-4aac-81d7-c061916a9108@laker.email> <CAH+w=7YepkrZ1EYkovCvH-Qib4LCqFMGaw+j3EG8Cn3bTaE+XQ@mail.gmail.com> <e3adbc41-1cba-46d7-99a7-552a14882c59@laker.email>
On Sat, Oct 21, 2023 at 9:26 AM Kyle Laker <kyle@laker.email> wrote:
>
> Thanks for the context! So it seems like the issue is in the
> non-getcwd() zgetdir() code path. Checking against master, this issue is
> no longer present with a default configure after workers/50287
Aha. I should have thought to look at the older source.
> I'm not sure how these btrfs homedir mounts can be determined in
> situations like this (or how valuable it would be since nearly everyone
> with btrfs probably has a working getcwd(3)). But perhaps if the final
> zchdir() fails, zgetdir() could chdir(3) back to the original path
> rather than the resolved path?
So this reaches the "return NULL" at the end of zgetdir(), after the
comment "Something bad happened." ?
Or conversely this is a consequence of zgetdir() not checking the
return value from zchdir(), which it doesn't in a couple of places?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author