fpathconf.3: Rework RETURN VALUE description to add more detail

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-06-18 11:15:34 +02:00
parent 480ef6d924
commit 081a3c719b
1 changed files with 35 additions and 6 deletions

View File

@ -158,14 +158,43 @@ or
.I path
must refer to a terminal.
.SH RETURN VALUE
The limit is returned, if one exists.
If the system does not have a
limit for the requested resource, \-1 is returned, and
The return value of these functions is one of the following:
.IP * 3
On error, \-1 is returned and
.I errno
is unchanged.
If there is an error, \-1 is returned, and
is set to indicate the cause of the error
(for example,
.BR EINVAL ,
indicating that
.I name
is invalid).
.IP *
If
.I name
corresponds to a maximum or minimum limit, and that limit is indeterminate,
\-1 is returned and
.I errno
is set to reflect the nature of the error.
is not changed.
(To distinguish an indeterminate limit from an error, set
.I errno
to zero before the call, and then check whether
.I errno
is nonzero when \-1 is returned.)
.IP *
If
.I name
corresponds to an option,
a positive value is returned if the option is supported,
and \-1 is returned if the option is not supported.
.IP *
Otherwise,
the current value of the option or limit is returned.
This value will not be more restrictive than
the corresponding value that was described to the application in
.I <unistd.h>
or
.I <limits.h>
when the application was compiled.
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).