Re: Question: How to switch a process namespace by nsfs "device" and inode number directly?

2018-09-12 Thread Andi Kleen
On Wed, Sep 12, 2018 at 10:05:27AM +0800, Chengdong Li wrote: > Thank you, Andi! > > Yes, that's a situation, also it's an important one I guess. > > Another case is that a process running inside a container has exited but the > container still alive.I think this is also a common case. The potent

Re: Question: How to switch a process namespace by nsfs "device" and inode number directly?

2018-09-11 Thread Chengdong Li
Thank you, Andi! Yes, that's a situation, also it's an important one I guess. Another case is that a process running inside a container has exited but the container still alive.I think this is also a common case. The potential fix solutions I am thinking are following: - Using nsfs "device"

Re: Question: How to switch a process namespace by nsfs "device" and inode number directly?

2018-09-10 Thread Andi Kleen
On Mon, Sep 10, 2018 at 04:50:42PM +0800, Chengdong Li wrote: > Hi folks, > > I am getting stuck by the lack of approach to switch process namespace by > nsfs "device" and inode number in user-space,  for example (mnt: 0xf000) > > From my best understanding, the normal way to do that is by se

Question: How to switch a process namespace by nsfs "device" and inode number directly?

2018-09-10 Thread Chengdong Li
Hi folks, I am getting stuck by the lack of approach to switch process namespace by nsfs "device" and inode number in user-space,  for example (mnt: 0xf000) From my best understanding, the normal way to do that is by setns system call. But setns only accept fd that refer to a opened name