OpenVZ Forum


Home » Mailing lists » Devel » task_session() and task->signal->session
Re: task_session() and task->signal->session [message #16753 is a reply to message #16752] Thu, 16 November 2006 16:17 Go to previous messageGo to previous message
serue is currently offline  serue
Messages: 750
Registered: February 2006
Senior Member
Looking at fork, it seems that task->group_leader is a thread grp
leader.  If you fork without the CLONE_THREAD flag, then
task->group_leader is set to task itself.  If with CLONE_THREAD flag,
then task->group_leader is set to the parent->group_leader.

The signal->session presumably is what we think of as process session.
At fork it is always set to parent->signal->session, and see
kernel/sys.c for where it gets tweaked.

-serge

Quoting Sukadev Bhattiprolu (sukadev@us.ibm.com):
> 
> I am trying to understand the diff between task_session() and
> task->signal-session and why we have the two notions of session.
> Are we just phasing out one of them ?
> 
> In general each process has a single session id. The only exception
> being a process that unshares its pid ns. Such process will have
> exactly two session ids, one for each pid ns. No ?
> 
> Thanks,
> 
> Suka
> _______________________________________________
> Containers mailing list
> Containers@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/containers
_______________________________________________
Containers mailing list
Containers@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [RFC] [PATCH 0/3] user ns and vfs: Introduction
Next Topic: [PATCH] mounstats NULL pointer dereference
Goto Forum:
  


Current Time: Tue Oct 14 09:36:56 GMT 2025

Total time taken to generate the page: 0.22664 seconds