OpenVZ Forum


Home » Mailing lists » Devel » Processes with multiple pid_t values
Processes with multiple pid_t values [message #16870] Fri, 08 December 2006 21:23 Go to previous message
Sukadev Bhattiprolu is currently offline  Sukadev Bhattiprolu
Messages: 413
Registered: August 2006
Senior Member
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@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: vzmigrate filesystem rsync correction
Next Topic: [PATCH 0/5] fixing errors handling during pci_driver resume stage
Goto Forum:
  


Current Time: Sun Jul 13 07:57:40 GMT 2025

Total time taken to generate the page: 0.02045 seconds