[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MiNT 1.10: bug in p_waitpid
When a process exits both its own and its children's process time
should be added to the parent's children time. Also the time reported
as resource usage should include the children's time.
--- orig/dosmem.c Wed Feb 2 23:43:02 1994
+++ dosmem.c Mon May 16 19:28:48 1994
@@ -1094,16 +1094,16 @@
/* check resource usage */
if (rusage) {
- *rusage++ = p->usrtime;
- *rusage = p->systime;
+ *rusage++ = p->usrtime + p->chldutime;
+ *rusage = p->systime + p->chldstime;
}
/* avoid adding adopted trace processes usage to the foster parent */
if (curproc->pid == p->ppid) {
/* add child's resource usage to parent's */
if (p->wait_q == TSR_Q || p->wait_q == ZOMBIE_Q) {
- curproc->chldstime += p->systime;
- curproc->chldutime += p->usrtime;
+ curproc->chldstime += p->systime + p->chldstime;
+ curproc->chldutime += p->usrtime + p->chldutime;
}
}
--
+------------------------------------------------------------------------+
Andreas Schwab "And now for something
schwab@ls5.informatik.uni-dortmund.de completely different"
* Linux/Atari is coming real soon now, stay tuned *