Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0800d30832ddecf2d9dc40068fed9df95930a8f1
Commit:     0800d30832ddecf2d9dc40068fed9df95930a8f1
Parent:     85868995d9d82de5b0de38d695559daddffef893
Author:     Sukadev Bhattiprolu <[EMAIL PROTECTED]>
AuthorDate: Thu May 10 22:23:04 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri May 11 08:29:36 2007 -0700

    Use task_pgrp() task_session() in copy_process()
    
    Use task_pgrp() and task_session() in copy_process(), and avoid find_pid()
    call when attaching the task to its process group and session.
    
    Signed-off-by: Sukadev Bhattiprolu <[EMAIL PROTECTED]>
    Cc: Cedric Le Goater <[EMAIL PROTECTED]>
    Cc: Dave Hansen <[EMAIL PROTECTED]>
    Cc: Serge Hallyn <[EMAIL PROTECTED]>
    Cc: <[EMAIL PROTECTED]>
    Acked-by: Eric W. Biederman <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 kernel/fork.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/kernel/fork.c b/kernel/fork.c
index cf13c44..083bf89 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1249,14 +1249,11 @@ static struct task_struct *copy_process(unsigned long 
clone_flags,
                        __ptrace_link(p, current->parent);
 
                if (thread_group_leader(p)) {
-                       pid_t pgid = process_group(current);
-                       pid_t sid = process_session(current);
-
                        p->signal->tty = current->signal->tty;
-                       p->signal->pgrp = pgid;
+                       p->signal->pgrp = process_group(current);
                        set_signal_session(p->signal, process_session(current));
-                       attach_pid(p, PIDTYPE_PGID, find_pid(pgid));
-                       attach_pid(p, PIDTYPE_SID, find_pid(sid));
+                       attach_pid(p, PIDTYPE_PGID, task_pgrp(current));
+                       attach_pid(p, PIDTYPE_SID, task_session(current));
 
                        list_add_tail_rcu(&p->tasks, &init_task.tasks);
                        __get_cpu_var(process_counts)++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to