-
Improvement
-
Resolution: Unresolved
-
Normal
-
None
-
None
Currently, in fchroot 0.4.1 and previous versions, it's not possible to simultaneously fchroot into the same fchroot environment more than once simultaneously. This could be really useful, but doesn't work reliably because when you exit the first fchroot, it will unbind-mount things which can break the second fchroot.
One way to fix this is to have each fchroot log information such as its pid and bind-mounts into /run/fchroot/ within the fchroot, and have the first fchroot be responsible for setting up the QEMU wrapper, and the last-exiting fchroot be responsible for undoing the bind mounts. This would allow seamless multiple fchroots to work without issue and be a nice feature addition.
Since fchroot is written in Python, adding this functionality shouldn't be too difficult.