[CRIU] How can I get "real pid" in pid namespace?

Chanho Park chanho61.park at samsusng.com
Mon Jul 1 01:54:24 EDT 2013


> > However, many legacy application exports its pid and send it to other
> > processes to identify the process.
> > Other processes can identify the process from real pid not vpid.
> 
> Other processes can identify the process from vpid and pidns, so you
> should exports its pid namespace besides its pid.

Hmm. Other processes can't recognize the vpid in the pid namespace.
My question is how can we convert vpid to pid without any kernel hack.

> 
> >
> > I know the behavior is not suitable for the purpose of container.
> > I think if the virtual pid is exported to out of namespace, it should
> > be converted to the real pid.
> >
> > How can the process get "real pid" in the pid namespace?
> 
> It can't, the process in the pid namespace can't know they are in a sub
> pidns or not, the mechanism decide this.

Do we need new API like export_pid() to get the real pid in the pid
namespace?

Thanks,

Best regards,
Chanho Park



More information about the CRIU mailing list