OpenVZ Forum


Home » Mailing lists » Devel » Mapping PIDs from parent->child namespaces
Mapping PIDs from parent->child namespaces [message #41984] Mon, 03 January 2011 23:02 Go to previous message
Mike Heffner is currently offline  Mike Heffner
Messages: 4
Registered: January 2011
Junior Member
Hi,

Is it possible for a process running in a parent PID namespace to map
the PID of a process running in a child's namespace from the
parent->child's namespace? For example, if I span the process "myproc"
with CLONE_NEWPID then a call to getpid() inside myproc will return "1"
whereas in the parent's namespace that process could actually be PID
"23495". I'd like to be able to know that 23495 maps to 1 in the new NS.
Obviously, just mapping the first PID is straightforward since I can
just look at the result of clone(). However, mapping the PIDs of
processes subsequently forked from "myproc" -- in this example -- I
haven't been able to figure out.


Thanks,

Mike
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containe rs
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: cgroup tasks file error
Next Topic: Containers and /proc/sys/vm/drop_caches
Goto Forum:
  


Current Time: Sat Aug 02 20:20:07 GMT 2025

Total time taken to generate the page: 0.85222 seconds