summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2024-07-17 13:29:06 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2024-07-17 13:29:06 +0000
commit27ed415408820c8ba5c264fda64414465594719c (patch)
tree4cdd9517a13940dd2bcb62b1c6860b1078c023dc /lib
parent2ffc0023ff27edc765e59b4e647b60e66ef0911d (diff)
Be clear that RUSAGE_CHILDREN only works for terminated children that have
been waited for. If you SIG_IGN SIGCHLD or don't call any of the wait functions then RUSAGE_CHILDREN wont report anything. OK deraadt@ millert@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/getrusage.211
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/libc/sys/getrusage.2 b/lib/libc/sys/getrusage.2
index aeaf5c9d124..35eccf70b98 100644
--- a/lib/libc/sys/getrusage.2
+++ b/lib/libc/sys/getrusage.2
@@ -1,4 +1,4 @@
-.\" $OpenBSD: getrusage.2,v 1.17 2015/02/28 21:51:57 bentley Exp $
+.\" $OpenBSD: getrusage.2,v 1.18 2024/07/17 13:29:05 claudio Exp $
.\"
.\" Copyright (c) 1985, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)getrusage.2 8.1 (Berkeley) 6/4/93
.\"
-.Dd $Mdocdate: February 28 2015 $
+.Dd $Mdocdate: July 17 2024 $
.Dt GETRUSAGE 2
.Os
.Sh NAME
@@ -48,7 +48,10 @@ which can be one of the following:
.It Dv RUSAGE_SELF
Resources used by the current process.
.It Dv RUSAGE_CHILDREN
-Resources used by all the terminated children of the current process.
+Resources used by all the terminated children of the current process which
+were waited upon.
+If the child is never waited for, the resource information for the child
+process is discarded.
.It Dv RUSAGE_THREAD
Resources used by the current thread.
.El
@@ -186,4 +189,4 @@ flag has been available since
.Ox 4.8 .
.Sh BUGS
There is no way to obtain information about a child process
-that has not yet terminated.
+that has not yet terminated or has not been waited for by the parent.