Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 43640
b: refs/heads/master
c: 62dfb55
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov authored and Linus Torvalds committed Dec 8, 2006
1 parent 976c965 commit 3e600ff
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 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: f020bc468fe4a91d32046d448511978c7b611315
refs/heads/master: 62dfb5541a025b47df9405ff0219c7829a97d83b
19 changes: 8 additions & 11 deletions trunk/kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,21 +189,18 @@ void release_task(struct task_struct * p)
int session_of_pgrp(int pgrp)
{
struct task_struct *p;
int sid = -1;
int sid = 0;

read_lock(&tasklist_lock);
do_each_task_pid(pgrp, PIDTYPE_PGID, p) {
if (process_session(p) > 0) {
sid = process_session(p);
goto out;
}
} while_each_task_pid(pgrp, PIDTYPE_PGID, p);
p = find_task_by_pid(pgrp);
if (p)

p = find_task_by_pid_type(PIDTYPE_PGID, pgrp);
if (p == NULL)
p = find_task_by_pid(pgrp);
if (p != NULL)
sid = process_session(p);
out:

read_unlock(&tasklist_lock);

return sid;
}

Expand Down

0 comments on commit 3e600ff

Please sign in to comment.