DescriptionChroot: allow multiple simultaneous entry.
Change enter_chroot.sh to keep a list of open PIDs (enter_chroot.sh
instances) in chroot/var/lock, and use flock on that file to support
atomic operations to it.
When entering chroot, append the PID to the lock file.
When exiting chroot, clear out current PID and any dead
PIDs/duplicates. If the lock file is empty, only then clean up the
mounts.
Note that I have a little bit of code duplication: the number 200,
which is a manually numbered fd in bash, seemed impossible to place
inside a variable. If you know how to do it, please let me know.
Patch Set 1 #
Total comments: 1
Patch Set 2 : fix for review #Messages
Total messages: 4 (0 generated)
|