aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 384f09caf2ef..3bec141c82f6 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -357,16 +357,12 @@ static void reparent_to_kthreadd(void)
357void __set_special_pids(struct pid *pid) 357void __set_special_pids(struct pid *pid)
358{ 358{
359 struct task_struct *curr = current->group_leader; 359 struct task_struct *curr = current->group_leader;
360 pid_t nr = pid_nr(pid);
361 360
362 if (task_session(curr) != pid) { 361 if (task_session(curr) != pid)
363 change_pid(curr, PIDTYPE_SID, pid); 362 change_pid(curr, PIDTYPE_SID, pid);
364 set_task_session(curr, nr); 363
365 } 364 if (task_pgrp(curr) != pid)
366 if (task_pgrp(curr) != pid) {
367 change_pid(curr, PIDTYPE_PGID, pid); 365 change_pid(curr, PIDTYPE_PGID, pid);
368 set_task_pgrp(curr, nr);
369 }
370} 366}
371 367
372static void set_special_pids(struct pid *pid) 368static void set_special_pids(struct pid *pid)