Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74582
b: refs/heads/master
c: 5cd1756
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Dec 5, 2007
1 parent 66a9801 commit 2dc5a9b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e00ba3dae077f54cfd2af42e939a618caa7a3bca
refs/heads/master: 5cd17569fd0eeca510735e63a6061291e3971bf6
21 changes: 6 additions & 15 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -1292,23 +1292,14 @@ static struct task_struct *copy_process(unsigned long clone_flags,
__ptrace_link(p, current->parent);

if (thread_group_leader(p)) {
if (clone_flags & CLONE_NEWPID) {
if (clone_flags & CLONE_NEWPID)
p->nsproxy->pid_ns->child_reaper = p;
p->signal->tty = NULL;
set_task_pgrp(p, p->pid);
set_task_session(p, p->pid);
attach_pid(p, PIDTYPE_PGID, pid);
attach_pid(p, PIDTYPE_SID, pid);
} else {
p->signal->tty = current->signal->tty;
set_task_pgrp(p, task_pgrp_nr(current));
set_task_session(p, task_session_nr(current));
attach_pid(p, PIDTYPE_PGID,
task_pgrp(current));
attach_pid(p, PIDTYPE_SID,
task_session(current));
}

p->signal->tty = current->signal->tty;
set_task_pgrp(p, task_pgrp_nr(current));
set_task_session(p, task_session_nr(current));
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)++;
}
Expand Down

0 comments on commit 2dc5a9b

Please sign in to comment.