patch-2.3.25 linux/kernel/exit.c

Next file: linux/kernel/sys.c
Previous file: linux/kernel/exec_domain.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.24/linux/kernel/exit.c linux/kernel/exit.c
@@ -455,6 +455,7 @@
 	add_wait_queue(&current->wait_chldexit,&wait);
 repeat:
 	flag = 0;
+	current->state = TASK_INTERRUPTIBLE;
 	read_lock(&tasklist_lock);
  	for (p = current->p_cptr ; p ; p = p->p_osptr) {
 		if (pid>0) {
@@ -521,12 +522,12 @@
 		retval = -ERESTARTSYS;
 		if (signal_pending(current))
 			goto end_wait4;
-		current->state=TASK_INTERRUPTIBLE;
 		schedule();
 		goto repeat;
 	}
 	retval = -ECHILD;
 end_wait4:
+	current->state = TASK_RUNNING;
 	remove_wait_queue(&current->wait_chldexit,&wait);
 	return retval;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)