From 45f2d4eb13c88df64f802c4020030facd10c7471 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 9 Jun 2009 06:01:59 +0200 Subject: [PATCH] sigaction.2: EWxpand description of si_utime and si_stime fields of siginfo_t Signed-off-by: Michael Kerrisk --- man2/sigaction.2 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/man2/sigaction.2 b/man2/sigaction.2 index ff96b2e0a..5d9a02333 100644 --- a/man2/sigaction.2 +++ b/man2/sigaction.2 @@ -300,7 +300,22 @@ the timer; it is not the same as the timer ID returned by .B SIGCHLD fills in .IR si_status ", " si_utime " and " si_stime . -.\" FIXME . +The +.I si_utime +and +.I si_stime +fields do not include the times used by waited for children (unlike +.BR getrusage (2) +and +.BR time (2). +In kernels up to 2.6, and since 2.6.27, these fields report +CPU time in units of +.IR sysconf(_SC_CLK_TCK) . +In 2.6 kernels before 2.6.27, +a bug meant that these fields reported time in units +of the (configurable) system jiffy (see +.BR time (7)). +\" FIXME . .\" When si_utime and si_stime where originally implemented, the .\" measurement unit was HZ, which was the same as clock ticks .\" (sysconf(_SC_CLK_TCK)). In 2.6, HZ became configurable, and @@ -310,7 +325,7 @@ fills in .\" USER_HZ instead, so that sysconf(_SC_CLK_TCK) could be used to .\" convert to seconds. I have a queued patch to fix this: .\" http://thread.gmane.org/gmane.linux.kernel/698061/ . -.\" Maybe it will make it into 2.6.27. +.\" This patch made it into 2.6.27. .\" But note that these fields still don't return the times of .\" waited for children (as is done by getrusage() and times() .\" and wait4()). Solaris 8 does include child times.