Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: `pwd -P` with systemd-homed causes inconsistent cwd state



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