[Devel] Processes with multiple pid_t values
Sukadev Bhattiprolu
sukadev at us.ibm.com
Fri Dec 8 13:23:47 PST 2006
A process that unshares its namespace gets a new pid_t in the child
namespace. Simlarly its process group and session leaders get new pid_ts
in the child namespace right ?
i.e do the following pid_ts look reasonable when process 1234 unshares
its pid namespace ?
PID PPID PGID SID
init pid ns 1234 1233 1230 1220
child pid ns 3 2 1 0
Assuming they are :-), we should expect find_pid() call with nr == 0, 1,
or 2 in the child pid namespace to also work right ?
But processes 1220, 1230, 1233 are entered into the hash table based on
their init pid ns values. And so the above find_pid() calls would not
find the process we want.
i.e some processes have two pid_ts and we want to find them using either
of the two values. The pid_hash table can obviously hash on one value.
We would need some serious changes to the pid_hash table to do this ???
(can we change the hash algorithm to generate a key based on all pid_ts
a process has ????)
Or should we just keep track of these special processes (4 per namespace
including the child reaper) in the namespace object - just like we treat
the child_reaper special ?
Then find_pid() would have to check the namespace object in addition to
hash table.
Appreciate any ideas/comments.
Suka
_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
More information about the Devel
mailing list