summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-04-14 02:34:59 +0000
committerdd <dd@FreeBSD.org>2001-04-14 02:34:59 +0000
commitefb187afd627d04e95f8e2655dd3b31213823097 (patch)
tree264803e8629b1b43eaab5a948c549d5e778fac0f
parent84a105c2dab73ef132af9bb715f90ba6b0c51b20 (diff)
downloadFreeBSD-src-efb187afd627d04e95f8e2655dd3b31213823097.zip
FreeBSD-src-efb187afd627d04e95f8e2655dd3b31213823097.tar.gz
Add ``RETURN VALUES'' and ``ERRORS'' sections since getpgid(2) can
fail. Also fix a minor grammar nit (it's -> its). PR: 26520
-rw-r--r--lib/libc/sys/getpgrp.219
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/libc/sys/getpgrp.2 b/lib/libc/sys/getpgrp.2
index 8e56708..11b0063 100644
--- a/lib/libc/sys/getpgrp.2
+++ b/lib/libc/sys/getpgrp.2
@@ -76,6 +76,23 @@ and
.Fn tcsetpgrp
calls
are used to get/set the process group of the control terminal.
+.Sh RETURN VALUES
+The
+.Fn getpgrp
+call always succeeds.
+Upon successful completion, the
+.Fn getpgid
+call returns the process group of the specified process;
+otherwise, it returns a value of \-1 and sets
+.Va errno
+to indicate the error.
+.Sh ERRORS
+.Fn getpgid
+will succeed unless:
+.Bl -tag -width Er
+.It Bq Er ESRCH
+there is no process whose process ID equals fo
+.Fa pid
.Sh SEE ALSO
.Xr getsid 2 ,
.Xr setpgid 2 ,
@@ -87,7 +104,7 @@ function call appeared in
.Bx 4.0 .
The
.Fn getpgid
-function call is derived from it's usage in System V Release 4.
+function call is derived from its usage in System V Release 4.
.Sh STANDARDS
The
.Fn getpgrp
OpenPOWER on IntegriCloud