Red Hat Bugzilla – Bug 61017
getrusage() produces incorrect results for threads
Last modified: 2008-08-01 12:22:52 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128
Description of problem:
the system call "getrusage" does not include user nor system time used by
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Use "pthread_create" to execute a thread that does some calculations.
Use "pthread_join" to wait for it to complete.
Call "getrusage" for self and again for children, it does not report the
user or system time used by the thread.
Actual Results: The "getrusage" call did not report the correct times for threads.
I have verified that the same code compiled and run under FreeBSD, Irix,
and Solaris does produce the expected results showing the times used by threads.
Expected Results: The "getrusage" call should include time used by threads
Thanks for the bug report. However, Red Hat no longer maintains this version of
the product. Please upgrade to the latest version and open a new bug if the problem
The Fedora Legacy project (http://fedoralegacy.org/) maintains some older releases,
and if you believe this bug is interesting to them, please report the problem in
the bug tracker at: http://bugzilla.fedora.us/