Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 256858
b: refs/heads/master
c: 087806b
h: refs/heads/master
v: v3
  • Loading branch information
Oleg Nesterov committed Jun 27, 2011
1 parent d443c35 commit 355e4c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 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: d4f7c511c1c2a67eb287987cf1ce9554149030e6
refs/heads/master: 087806b1281563e4ae7a5bce3155f894af5f4118
1 change: 1 addition & 0 deletions trunk/fs/exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,7 @@ static int de_thread(struct task_struct *tsk)
leader->group_leader = tsk;

tsk->exit_signal = SIGCHLD;
leader->exit_signal = -1;

BUG_ON(leader->exit_state != EXIT_ZOMBIE);
leader->exit_state = EXIT_DEAD;
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -2284,8 +2284,10 @@ static inline int get_nr_threads(struct task_struct *tsk)
return tsk->signal->nr_threads;
}

/* de_thread depends on thread_group_leader not being a pid based check */
#define thread_group_leader(p) (p == p->group_leader)
static inline bool thread_group_leader(struct task_struct *p)
{
return p->exit_signal >= 0;
}

/* Do to the insanities of de_thread it is possible for a process
* to have the pid of the thread group leader without actually being
Expand Down

0 comments on commit 355e4c4

Please sign in to comment.