summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorKarel Zak2015-04-09 11:48:07 +0200
committerKarel Zak2015-04-14 11:39:15 +0200
commitc84f2590dfdb8570beeb731e0105f8fe597443d1 (patch)
tree7ceb33f46188a0e6d0832e6e9580f805d148d30b /tests/functions.sh
parentunshare: allow persisting namespaces (diff)
downloadkernel-qcow2-util-linux-c84f2590dfdb8570beeb731e0105f8fe597443d1.tar.gz
kernel-qcow2-util-linux-c84f2590dfdb8570beeb731e0105f8fe597443d1.tar.xz
kernel-qcow2-util-linux-c84f2590dfdb8570beeb731e0105f8fe597443d1.zip
unshare: allow persisting mount namespaces
We can create a reference (bind mount) to the new namespace after unshare(2), but it does not make sense to do it within unshared namespace. (And if I read kernel fs/namespace.c: do_loopback() correctly than copy mount bind mounts of /proc/<pid>/ns/mnt between namespaces is unsupported.) This patch bypass this problem by fork() where parent continue as usually (call unshare(2), setup another things, etc.), but child waits for /proc/[ppid]/ns/mnt inode number change (the ino is changed after parent's unshare(2)) and then it bind mounts the new namespaces and exit. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
0 files changed, 0 insertions, 0 deletions