patch-2.3.99-pre1 linux/kernel/fork.c
Next file: linux/kernel/module.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index
- Lines: 24
- Date:
Mon Mar 13 16:33:10 2000
- Orig file:
v2.3.51/linux/kernel/fork.c
- Orig date:
Fri Mar 10 16:40:50 2000
diff -u --recursive --new-file v2.3.51/linux/kernel/fork.c linux/kernel/fork.c
@@ -647,8 +647,11 @@
p->run_list.next = NULL;
p->run_list.prev = NULL;
- if ((clone_flags & CLONE_VFORK) || !(clone_flags & CLONE_PARENT))
- p->p_pptr = p->p_opptr = current;
+ if ((clone_flags & CLONE_VFORK) || !(clone_flags & CLONE_PARENT)) {
+ p->p_opptr = current;
+ if (!(current->flags & PF_PTRACED))
+ p->p_pptr = current;
+ }
p->p_cptr = NULL;
init_waitqueue_head(&p->wait_chldexit);
p->vfork_sem = NULL;
@@ -748,8 +751,7 @@
bad_fork_cleanup_files:
exit_files(p); /* blocking */
bad_fork_cleanup:
- if (p->exec_domain && p->exec_domain->module)
- __MOD_DEC_USE_COUNT(p->exec_domain->module);
+ put_exec_domain(p->exec_domain);
if (p->binfmt && p->binfmt->module)
__MOD_DEC_USE_COUNT(p->binfmt->module);
bad_fork_cleanup_count:
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)