diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2006-12-08 05:37:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:51 -0500 |
commit | 937949d9edbf4049bd41af6c9f92c26280584564 (patch) | |
tree | d0a28f503b082f890cfa1f7fe952fda8fc771752 /kernel/fork.c | |
parent | ef55d53caa055aedee13e77da82740987dd64f2d (diff) |
[PATCH] add process_session() helper routine
Replace occurences of task->signal->session by a new process_session() helper
routine.
It will be useful for pid namespaces to abstract the session pid number.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 597707819327..298c4d6ab512 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1259,9 +1259,9 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1259 | if (thread_group_leader(p)) { | 1259 | if (thread_group_leader(p)) { |
1260 | p->signal->tty = current->signal->tty; | 1260 | p->signal->tty = current->signal->tty; |
1261 | p->signal->pgrp = process_group(current); | 1261 | p->signal->pgrp = process_group(current); |
1262 | p->signal->session = current->signal->session; | 1262 | p->signal->session = process_session(current); |
1263 | attach_pid(p, PIDTYPE_PGID, process_group(p)); | 1263 | attach_pid(p, PIDTYPE_PGID, process_group(p)); |
1264 | attach_pid(p, PIDTYPE_SID, p->signal->session); | 1264 | attach_pid(p, PIDTYPE_SID, process_session(p)); |
1265 | 1265 | ||
1266 | list_add_tail_rcu(&p->tasks, &init_task.tasks); | 1266 | list_add_tail_rcu(&p->tasks, &init_task.tasks); |
1267 | __get_cpu_var(process_counts)++; | 1267 | __get_cpu_var(process_counts)++; |