Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86669
b: refs/heads/master
c: 05e83df
h: refs/heads/master
i:
  86667: 3397097
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Mar 3, 2008
1 parent e02e556 commit a22b343
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: f49ee505b1ecb5960984880740f09aba87f870dc
refs/heads/master: 05e83df624fe682bb8571cdb2c6d5284a99c3066
17 changes: 8 additions & 9 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,19 @@ struct pid *session_of_pgrp(struct pid *pgrp)
static int will_become_orphaned_pgrp(struct pid *pgrp, struct task_struct *ignored_task)
{
struct task_struct *p;
int ret = 1;

do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
if (p == ignored_task
|| p->exit_state
|| is_global_init(p->real_parent))
if ((p == ignored_task) ||
(p->exit_state && thread_group_empty(p)) ||
is_global_init(p->real_parent))
continue;

if (task_pgrp(p->real_parent) != pgrp &&
task_session(p->real_parent) == task_session(p)) {
ret = 0;
break;
}
task_session(p->real_parent) == task_session(p))
return 0;
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
return ret; /* (sighing) "Often!" */

return 1;
}

int is_current_pgrp_orphaned(void)
Expand Down

0 comments on commit a22b343

Please sign in to comment.