Skip to content
  • Kamil Trzciński's avatar
    Unshare mount namespace to fix `getcwd` · 4e64869e
    Kamil Trzciński authored
    Previously we would call `LazyUnbind` as soon
    as proces starts. This does break `getcwd`
    as it starts returning `(unreachable)`
    due to mountpoint being gone from `chroot`.
    
    This removes the need for `LazyUnbind` and
    instead `unshare` mount namespace, making
    the new process to have it's own mounts
    that are not shared with parent process.
    The mounts gets cleaned-up once the process
    exists.
    4e64869e