Thread View: gnu.bash.bug
1 messages
1 total messages
Started by Ray Moody
Sat, 05 Aug 1989 21:56
Bug in flush_child -- calling add_times with bogus rusage
Author: Ray Moody
Date: Sat, 05 Aug 1989 21:56
Date: Sat, 05 Aug 1989 21:56
51 lines
1931 bytes
1931 bytes
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);
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads