To expand slightly on what Stephane was saying, you can see the problem easily from the snap I provided, in terminal 1 (ie, the one that set the network namespace):
bash-4.3# cat /var/run/netns/testnet
cat: /var/run/netns/testnet: Invalid argument
(shows this is a magical file)
in terminal 2:
bash-4.3# cat /var/run/netns/testnet
bash-4.3#
(shows this is just an empty file)
To expand slightly on what Stephane was saying, you can see the problem easily from the snap I provided, in terminal 1 (ie, the one that set the network namespace):
bash-4.3# cat /var/run/ netns/testnet netns/testnet: Invalid argument
cat: /var/run/
(shows this is a magical file)
in terminal 2: netns/testnet
bash-4.3# cat /var/run/
bash-4.3#
(shows this is just an empty file)