patch-2.2.0-pre6 linux/kernel/fork.c
Next file: linux/mm/page_alloc.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index
-  Lines: 18
-  Date:
Fri Jan  8 14:03:31 1999
-  Orig file: 
v2.2.0-pre5/linux/kernel/fork.c
-  Orig date: 
Fri Jan  1 12:58:21 1999
diff -u --recursive --new-file v2.2.0-pre5/linux/kernel/fork.c linux/kernel/fork.c
@@ -283,6 +283,9 @@
  */
 void mmput(struct mm_struct *mm)
 {
+	/* notify parent sleeping on vfork() */
+	wake_up(¤t->p_opptr->vfork_sleep);
+
 	if (atomic_dec_and_test(&mm->count)) {
 		release_segments(mm);
 		exit_mmap(mm);
@@ -521,6 +524,7 @@
 	p->p_pptr = p->p_opptr = current;
 	p->p_cptr = NULL;
 	init_waitqueue(&p->wait_chldexit);
+	init_waitqueue(&p->vfork_sleep);
 
 	p->sigpending = 0;
 	sigemptyset(&p->signal);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov