OpenVZ Forum


Home » Mailing lists » Devel » [RFC][PATCH] rename 'struct pid'
Re: [RFC][PATCH] rename 'struct pid' [message #18163 is a reply to message #18150] Wed, 11 April 2007 16:53 Go to previous messageGo to previous message
Dave Hansen is currently offline  Dave Hansen
Messages: 240
Registered: October 2005
Senior Member
On Wed, 2007-04-11 at 10:13 -0600, Eric W. Biederman wrote:
> Because the suggestions I have seen are based on a partial understanding
> of struct pid, and the suggested renames will reinforce misunderstandings
> of what struct pid is.

Let's take a step back, then and see if we can nicely define what it
does.  Maybe we can come up with a bit better comment for 'struct
pid'.  

---

'struct pid' is a way for the kernel to get (and keep) a reference to a
task (or set of tasks) with a particular numeric value.  If there are
any tasks with this numeric value from now on, the structure will stay
pointed to those tasks.

In general, the underlying task will not change, but it can in cases
like when a non-thread-leader does an exec() and takes over as the
leader (the pid will change).

This reference will not keep the tasks from exiting.  But, even if all
of these tasks exit, the kernel will honor the fact that your reference
exists and will not re-create any tasks with the same numeric value, as
long as you allow your reference to persist.

-- Dave

_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IPC NS tests ?
Next Topic: [RFC | PATCH 0/9] CPU controller over process container
Goto Forum:
  


Current Time: Fri Aug 16 05:24:30 GMT 2024

Total time taken to generate the page: 0.02860 seconds