diff options
| author | David Howells <dhowells@redhat.com> | 2002-03-14 21:20:04 -0800 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-03-14 21:20:04 -0800 |
| commit | 3154d91ded003170229670313ff6ded47bcf640e (patch) | |
| tree | 6a9dfa1f8715895b00dadf63110a2dc49ef46fcd /kernel/fork.c | |
| parent | 5d043fece463db6fcd69dfe1ec2a094d352af15c (diff) | |
[PATCH] wait4() WIFSTOPPED starvation fix #1/2
This patch (#1) just converts the task_struct to use struct list_head rather
than direct pointers for maintaining the children list.
Diffstat (limited to 'kernel/fork.c')
| -rw-r--r-- | kernel/fork.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 2f3f7301236f..a05f52776e35 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -666,7 +666,8 @@ int do_fork(unsigned long clone_flags, unsigned long stack_start, INIT_LIST_HEAD(&p->run_list); - p->p_cptr = NULL; + INIT_LIST_HEAD(&p->children); + INIT_LIST_HEAD(&p->sibling); init_waitqueue_head(&p->wait_chldexit); p->vfork_done = NULL; if (clone_flags & CLONE_VFORK) { @@ -766,12 +767,12 @@ int do_fork(unsigned long clone_flags, unsigned long stack_start, write_lock_irq(&tasklist_lock); /* CLONE_PARENT re-uses the old parent */ - p->p_opptr = current->p_opptr; - p->p_pptr = current->p_pptr; + p->real_parent = current->real_parent; + p->parent = current->parent; if (!(clone_flags & CLONE_PARENT)) { - p->p_opptr = current; + p->real_parent = current; if (!(p->ptrace & PT_PTRACED)) - p->p_pptr = current; + p->parent = current; } if (clone_flags & CLONE_THREAD) { |
