ray@MAXWELL.PHYSICS.PURDUE.EDU (Ray Moody) (08/06/89)
Start any program. Stop it with ^Z. say "times". You will get
incorrect information, possibly including negative numbers.
When a process stops and may be resumed, no rusage information is
provided by wait3, but flush_child calls add_times anyway.
Ray
-------------------------------------------------------------------------------
RCS file: RCS/jobs.c,v
retrieving revision 1.2.1.2
diff -c -r1.2.1.2 jobs.c
*** /tmp/,RCSt1012497 Sat Aug 5 16:54:55 1989
--- jobs.c Sat Aug 5 16:27:54 1989
***************
*** 1081,1086
if (pid > 0)
{
/* Keep track of total time used. */
add_times (&rusage);
--- 1081,1088 -----
if (pid > 0)
{
+ /* Fixed by Ray Sat Aug 5 16:27:19 EST 1989 to ignore invalid
+ rusage info for jobs not yet finished */
/* Keep track of total time used. */
if (! WIFSTOPPED (status))
add_times (&rusage);
***************
*** 1082,1088
if (pid > 0)
{
/* Keep track of total time used. */
! add_times (&rusage);
/* Locate our PROCESS for this pid. */
child = find_pipeline (pid);
--- 1084,1091 -----
/* Fixed by Ray Sat Aug 5 16:27:19 EST 1989 to ignore invalid
rusage info for jobs not yet finished */
/* Keep track of total time used. */
! if (! WIFSTOPPED (status))
! add_times (&rusage);
/* Locate our PROCESS for this pid. */
child = find_pipeline (pid);