mirror of https://github.com/mkerrisk/man-pages
accept.2, access.2, getpriority.2, mlock.2: ERRORS: combine errors into a single list
These split out errors into separate lists (perhaps per API, perhaps "may" vs "shall", perhaps "Linux-specific" vs standard(??)), but there's no good reason to do this. It makes the error list harder to read, and is inconsistent with other pages. So, combine the errors into a single list. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
cfda555640
commit
18ce9c4a1b
|
@ -261,15 +261,11 @@ does not refer to a socket.
|
||||||
The referenced socket is not of type
|
The referenced socket is not of type
|
||||||
.BR SOCK_STREAM .
|
.BR SOCK_STREAM .
|
||||||
.TP
|
.TP
|
||||||
.B EPROTO
|
|
||||||
Protocol error.
|
|
||||||
.PP
|
|
||||||
In addition, Linux
|
|
||||||
.BR accept ()
|
|
||||||
may fail if:
|
|
||||||
.TP
|
|
||||||
.B EPERM
|
.B EPERM
|
||||||
Firewall rules forbid connection.
|
Firewall rules forbid connection.
|
||||||
|
.TP
|
||||||
|
.B EPROTO
|
||||||
|
Protocol error.
|
||||||
.PP
|
.PP
|
||||||
In addition, network errors for the new socket and as defined
|
In addition, network errors for the new socket and as defined
|
||||||
for the protocol may be returned.
|
for the protocol may be returned.
|
||||||
|
|
|
@ -218,10 +218,6 @@ and the file does not exist, or some other error occurred),
|
||||||
.I errno
|
.I errno
|
||||||
is set to indicate the error.
|
is set to indicate the error.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
.BR access ()
|
|
||||||
and
|
|
||||||
.BR faccessat ()
|
|
||||||
shall fail if:
|
|
||||||
.TP
|
.TP
|
||||||
.B EACCES
|
.B EACCES
|
||||||
The requested access would be denied to the file, or search permission
|
The requested access would be denied to the file, or search permission
|
||||||
|
@ -230,6 +226,32 @@ is denied for one of the directories in the path prefix of
|
||||||
(See also
|
(See also
|
||||||
.BR path_resolution (7).)
|
.BR path_resolution (7).)
|
||||||
.TP
|
.TP
|
||||||
|
.B EBADF
|
||||||
|
.RB ( faccessat ())
|
||||||
|
.I pathname
|
||||||
|
is relative but
|
||||||
|
.I dirfd
|
||||||
|
is neither
|
||||||
|
.B AT_FDCWD
|
||||||
|
.RB ( faccessat ())
|
||||||
|
nor a valid file descriptor.
|
||||||
|
.TP
|
||||||
|
.B EFAULT
|
||||||
|
.I pathname
|
||||||
|
points outside your accessible address space.
|
||||||
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
.I mode
|
||||||
|
was incorrectly specified.
|
||||||
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
.RB ( faccessat ())
|
||||||
|
Invalid flag specified in
|
||||||
|
.IR flags .
|
||||||
|
.TP
|
||||||
|
.B EIO
|
||||||
|
An I/O error occurred.
|
||||||
|
.TP
|
||||||
.B ELOOP
|
.B ELOOP
|
||||||
Too many symbolic links were encountered in resolving
|
Too many symbolic links were encountered in resolving
|
||||||
.IR pathname .
|
.IR pathname .
|
||||||
|
@ -243,57 +265,27 @@ A component of
|
||||||
.I pathname
|
.I pathname
|
||||||
does not exist or is a dangling symbolic link.
|
does not exist or is a dangling symbolic link.
|
||||||
.TP
|
.TP
|
||||||
|
.B ENOMEM
|
||||||
|
Insufficient kernel memory was available.
|
||||||
|
.TP
|
||||||
.B ENOTDIR
|
.B ENOTDIR
|
||||||
A component used as a directory in
|
A component used as a directory in
|
||||||
.I pathname
|
.I pathname
|
||||||
is not, in fact, a directory.
|
is not, in fact, a directory.
|
||||||
.TP
|
.TP
|
||||||
.B EROFS
|
|
||||||
Write permission was requested for a file on a read-only filesystem.
|
|
||||||
.PP
|
|
||||||
.BR access ()
|
|
||||||
and
|
|
||||||
.BR faccessat ()
|
|
||||||
may fail if:
|
|
||||||
.TP
|
|
||||||
.B EFAULT
|
|
||||||
.I pathname
|
|
||||||
points outside your accessible address space.
|
|
||||||
.TP
|
|
||||||
.B EINVAL
|
|
||||||
.I mode
|
|
||||||
was incorrectly specified.
|
|
||||||
.TP
|
|
||||||
.B EIO
|
|
||||||
An I/O error occurred.
|
|
||||||
.TP
|
|
||||||
.B ENOMEM
|
|
||||||
Insufficient kernel memory was available.
|
|
||||||
.TP
|
|
||||||
.B ETXTBSY
|
|
||||||
Write access was requested to an executable which is being
|
|
||||||
executed.
|
|
||||||
.PP
|
|
||||||
The following additional errors can occur for
|
|
||||||
.BR faccessat ():
|
|
||||||
.TP
|
|
||||||
.B EBADF
|
|
||||||
.I pathname
|
|
||||||
is relative but
|
|
||||||
.I dirfd
|
|
||||||
is neither
|
|
||||||
.B AT_FDCWD
|
|
||||||
nor a valid file descriptor.
|
|
||||||
.TP
|
|
||||||
.B EINVAL
|
|
||||||
Invalid flag specified in
|
|
||||||
.IR flags .
|
|
||||||
.TP
|
|
||||||
.B ENOTDIR
|
.B ENOTDIR
|
||||||
|
.RB ( faccessat ())
|
||||||
.I pathname
|
.I pathname
|
||||||
is relative and
|
is relative and
|
||||||
.I dirfd
|
.I dirfd
|
||||||
is a file descriptor referring to a file other than a directory.
|
is a file descriptor referring to a file other than a directory.
|
||||||
|
.TP
|
||||||
|
.B EROFS
|
||||||
|
Write permission was requested for a file on a read-only filesystem.
|
||||||
|
.TP
|
||||||
|
.B ETXTBSY
|
||||||
|
Write access was requested to an executable which is being
|
||||||
|
executed.
|
||||||
.SH VERSIONS
|
.SH VERSIONS
|
||||||
.BR faccessat ()
|
.BR faccessat ()
|
||||||
was added to Linux in kernel 2.6.16;
|
was added to Linux in kernel 2.6.16;
|
||||||
|
|
|
@ -142,6 +142,13 @@ On failure, it returns \-1 and sets
|
||||||
to indicate the error.
|
to indicate the error.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
.TP
|
.TP
|
||||||
|
.B EACCES
|
||||||
|
The caller attempted to set a lower nice value
|
||||||
|
(i.e., a higher process priority), but did not
|
||||||
|
have the required privilege (on Linux: did not have the
|
||||||
|
.B CAP_SYS_NICE
|
||||||
|
capability).
|
||||||
|
.TP
|
||||||
.B EINVAL
|
.B EINVAL
|
||||||
.I which
|
.I which
|
||||||
was not one of
|
was not one of
|
||||||
|
@ -150,24 +157,6 @@ was not one of
|
||||||
or
|
or
|
||||||
.BR PRIO_USER .
|
.BR PRIO_USER .
|
||||||
.TP
|
.TP
|
||||||
.B ESRCH
|
|
||||||
No process was located using the
|
|
||||||
.I which
|
|
||||||
and
|
|
||||||
.I who
|
|
||||||
values specified.
|
|
||||||
.PP
|
|
||||||
In addition to the errors indicated above,
|
|
||||||
.BR setpriority ()
|
|
||||||
may fail if:
|
|
||||||
.TP
|
|
||||||
.B EACCES
|
|
||||||
The caller attempted to set a lower nice value
|
|
||||||
(i.e., a higher process priority), but did not
|
|
||||||
have the required privilege (on Linux: did not have the
|
|
||||||
.B CAP_SYS_NICE
|
|
||||||
capability).
|
|
||||||
.TP
|
|
||||||
.B EPERM
|
.B EPERM
|
||||||
A process was located, but its effective user ID did not match
|
A process was located, but its effective user ID did not match
|
||||||
either the effective or the real user ID of the caller,
|
either the effective or the real user ID of the caller,
|
||||||
|
@ -175,6 +164,13 @@ and was not privileged (on Linux: did not have the
|
||||||
.B CAP_SYS_NICE
|
.B CAP_SYS_NICE
|
||||||
capability).
|
capability).
|
||||||
But see NOTES below.
|
But see NOTES below.
|
||||||
|
.TP
|
||||||
|
.B ESRCH
|
||||||
|
No process was located using the
|
||||||
|
.I which
|
||||||
|
and
|
||||||
|
.I who
|
||||||
|
values specified.
|
||||||
.SH CONFORMING TO
|
.SH CONFORMING TO
|
||||||
POSIX.1-2001, POSIX.1-2008,
|
POSIX.1-2001, POSIX.1-2008,
|
||||||
SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
|
SVr4, 4.4BSD (these interfaces first appeared in 4.2BSD).
|
||||||
|
|
114
man2/mlock.2
114
man2/mlock.2
|
@ -182,6 +182,64 @@ is set to indicate the error,
|
||||||
and no changes are made to any locks in the
|
and no changes are made to any locks in the
|
||||||
address space of the process.
|
address space of the process.
|
||||||
.SH ERRORS
|
.SH ERRORS
|
||||||
|
.\"SVr4 documents an additional EAGAIN error code.
|
||||||
|
.TP
|
||||||
|
.B EAGAIN
|
||||||
|
.RB ( mlock (),
|
||||||
|
.BR mlock2 (),
|
||||||
|
and
|
||||||
|
.BR munlock ())
|
||||||
|
Some or all of the specified address range could not be locked.
|
||||||
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
.RB ( mlock (),
|
||||||
|
.BR mlock2 (),
|
||||||
|
and
|
||||||
|
.BR munlock ())
|
||||||
|
The result of the addition
|
||||||
|
.IR addr + len
|
||||||
|
was less than
|
||||||
|
.IR addr
|
||||||
|
(e.g., the addition may have resulted in an overflow).
|
||||||
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
.RB ( mlock2 ())
|
||||||
|
Unknown \fIflags\fP were specified.
|
||||||
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
.RB ( mlockall ())
|
||||||
|
Unknown \fIflags\fP were specified or
|
||||||
|
.B MCL_ONFAULT
|
||||||
|
was specified without either
|
||||||
|
.B MCL_FUTURE
|
||||||
|
or
|
||||||
|
.BR MCL_CURRENT .
|
||||||
|
.TP
|
||||||
|
.B EINVAL
|
||||||
|
(Not on Linux)
|
||||||
|
.I addr
|
||||||
|
was not a multiple of the page size.
|
||||||
|
.TP
|
||||||
|
.B ENOMEM
|
||||||
|
.RB ( mlock (),
|
||||||
|
.BR mlock2 (),
|
||||||
|
and
|
||||||
|
.BR munlock ())
|
||||||
|
Some of the specified address range does not correspond to mapped
|
||||||
|
pages in the address space of the process.
|
||||||
|
.TP
|
||||||
|
.B ENOMEM
|
||||||
|
.RB ( mlock (),
|
||||||
|
.BR mlock2 (),
|
||||||
|
and
|
||||||
|
.BR munlock ())
|
||||||
|
Locking or unlocking a region would result in the total number of
|
||||||
|
mappings with distinct attributes (e.g., locked versus unlocked)
|
||||||
|
exceeding the allowed maximum.
|
||||||
|
.\" I.e., the number of VMAs would exceed the 64kB maximum
|
||||||
|
(For example, unlocking a range in the middle of a currently locked
|
||||||
|
mapping would result in three mappings:
|
||||||
|
two locked mappings at each end and an unlocked mapping in the middle.)
|
||||||
.TP
|
.TP
|
||||||
.B ENOMEM
|
.B ENOMEM
|
||||||
(Linux 2.6.9 and later) the caller had a nonzero
|
(Linux 2.6.9 and later) the caller had a nonzero
|
||||||
|
@ -207,63 +265,9 @@ half of RAM.
|
||||||
The caller is not privileged, but needs privilege
|
The caller is not privileged, but needs privilege
|
||||||
.RB ( CAP_IPC_LOCK )
|
.RB ( CAP_IPC_LOCK )
|
||||||
to perform the requested operation.
|
to perform the requested operation.
|
||||||
.\"SVr4 documents an additional EAGAIN error code.
|
|
||||||
.PP
|
|
||||||
For
|
|
||||||
.BR mlock (),
|
|
||||||
.BR mlock2 (),
|
|
||||||
and
|
|
||||||
.BR munlock ():
|
|
||||||
.TP
|
|
||||||
.B EAGAIN
|
|
||||||
Some or all of the specified address range could not be locked.
|
|
||||||
.TP
|
|
||||||
.B EINVAL
|
|
||||||
The result of the addition
|
|
||||||
.IR addr + len
|
|
||||||
was less than
|
|
||||||
.IR addr
|
|
||||||
(e.g., the addition may have resulted in an overflow).
|
|
||||||
.TP
|
|
||||||
.B EINVAL
|
|
||||||
(Not on Linux)
|
|
||||||
.I addr
|
|
||||||
was not a multiple of the page size.
|
|
||||||
.TP
|
|
||||||
.B ENOMEM
|
|
||||||
Some of the specified address range does not correspond to mapped
|
|
||||||
pages in the address space of the process.
|
|
||||||
.TP
|
|
||||||
.B ENOMEM
|
|
||||||
Locking or unlocking a region would result in the total number of
|
|
||||||
mappings with distinct attributes (e.g., locked versus unlocked)
|
|
||||||
exceeding the allowed maximum.
|
|
||||||
.\" I.e., the number of VMAs would exceed the 64kB maximum
|
|
||||||
(For example, unlocking a range in the middle of a currently locked
|
|
||||||
mapping would result in three mappings:
|
|
||||||
two locked mappings at each end and an unlocked mapping in the middle.)
|
|
||||||
.PP
|
|
||||||
For
|
|
||||||
.BR mlock2 ():
|
|
||||||
.TP
|
|
||||||
.B EINVAL
|
|
||||||
Unknown \fIflags\fP were specified.
|
|
||||||
.PP
|
|
||||||
For
|
|
||||||
.BR mlockall ():
|
|
||||||
.TP
|
|
||||||
.B EINVAL
|
|
||||||
Unknown \fIflags\fP were specified or
|
|
||||||
.B MCL_ONFAULT
|
|
||||||
was specified without either
|
|
||||||
.B MCL_FUTURE
|
|
||||||
or
|
|
||||||
.BR MCL_CURRENT .
|
|
||||||
.PP
|
|
||||||
For
|
|
||||||
.BR munlockall ():
|
|
||||||
.TP
|
.TP
|
||||||
.B EPERM
|
.B EPERM
|
||||||
|
.RB ( munlockall ())
|
||||||
(Linux 2.6.8 and earlier) The caller was not privileged
|
(Linux 2.6.8 and earlier) The caller was not privileged
|
||||||
.RB ( CAP_IPC_LOCK ).
|
.RB ( CAP_IPC_LOCK ).
|
||||||
.SH VERSIONS
|
.SH VERSIONS
|
||||||
|
|
Loading…
Reference in New Issue