Open System Services System Calls Reference Manual (G06.25+, H06.03+)

fcntl(2) OSS System Calls Reference Manual
ERRORS
If any of these conditions occurs, the fcntl() function sets errno to the corresponding value:
[EAGAIN] The request parameter is F_SETLK, the type of lock (l_type)isshared
(F_RDLCK) or exclusive (F_WRLCK), and a segment of a le to be locked is
already exclusive-locked by another process.
The request parameter is F_SETLK, the type of lock is exclusive, and some por-
tion of a segment of a le to be locked is already shared-locked or exclusive-
locked by another process.
[EBADF] One of these conditions exists:
The request parameter is F_SETLK or F_SETLKW, the type of lock is
shared (F_RDLCK), and ledes is not a valid le descriptor open for
reading.
The type of lock is exclusive (F_WRLCK), and ledes is not a valid le
descriptor open for writing.
The ledes parameter is not a valid open le descriptor.
[ECONNRESET]
One of these conditions occurred:
The transport-provider process for this socket is no longer available.
The TCP/IP subsystem for this socket is no longer available.
The connection was forcibly closed by the peer socket.
The le descriptor specied by the ledes parameter can only be closed.
[EFAULT] The argument2 parameter is an invalid address.
[EINTR] The request parameter is F_SETLKW, and the fcntl() function was interrupted
by a signal that was caught.
[EINVAL] One of these conditions exists:
The request parameter is F_DUPFD, and the argument1 parameter is
negative or greater than or equal to the maximum number of opens per-
mitted.
The request parameter is F_GETLK, F_SETLK,orF_SETLKW, and
the data pointed to by argument2 is invalid, or ledes refers to a le that
does not support locking.
The request parameter is F_GETOWN, and the ledes parameter does
not specify a socket.
The request parameter is F_SETFD, and a ag in addition to
FD_CLOEXEC in the argument1 parameter is set. When the request
parameter is F_SETFD and FD_CLOEXEC is set, no other ag can be
set.
36 Hewlett-Packard Company 527186-003