JDevlieghere added a comment.

In D55827#1334671 <https://reviews.llvm.org/D55827#1334671>, @labath wrote:

> Hm... this seems like an important issue in the `RealFileSystem` (or our 
> usage of it), and I'm not sure it should be papered over like that. I mean, 
> lldb is a library, and requiring every call to `chdir` in the whole process 
> go through "our" implementation is not very friendly towards everyone else we 
> happen to be sharing a process with.


On the other hand (playing the devil's advocate) it could be considered nice 
that lldb as a library isn't affected by that if we explicitly set the cwd?

> It sounds like we want a VFS that is slightly more "real" than the 
> RealFileSystem, and which shares the notion of the CWD with the OS.

Did you have a look at the comment in `VirtualFileSystem.cpp` that explains why 
they went this route?

  // FIXME: chdir is thread hostile; on the other hand, creating the same
  // behavior as chdir is complex: chdir resolves the path once, thus
  // guaranteeing that all subsequent relative path operations work
  // on the same path the original chdir resulted in. This makes a
  // difference for example on network filesystems, where symlinks might be
  // switched during runtime of the tool. Fixing this depends on having a
  // file system abstraction that allows openat() style interactions.

Wouldn't we encounter the same problem?


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55827/new/

https://reviews.llvm.org/D55827



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to