Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

fcntl(2) OSS System Calls Reference Manual
F_SETFL Returns the value 0 (zero).
F_SETLK Returns the value 0 (zero).
F_SETLK64 Returns the value 0 (zero).
F_SETLKW Returns the value 0 (zero).
F_SETLKW64
Returns the value 0 (zero).
F_SETOWN Returns the value 0 (zero).
If the fcntl() function fails, the value -1 is returned, and errno is set to indicate the error.
ERRORS
If any of these conditions occurs, the fcntl( ) function sets errno to the corresponding value:
[EAGAIN] The request parameter is F_SETLK or F_SETLK64, the type of lock (l_type)is
shared (F_RDLCK) or exclusive (F_WRLCK), and a segment of a file to be
locked is already exclusive-locked by another process.
The request parameter is is F_SETLK or F_SETLK64, the type of lock is
exclusive, and some portion of a segment of a file to be locked is already
shared-locked or exclusive-locked by another process.
[EALREADY] Operation already in progress. An I/O operation started by a thread-aware func-
tion is in progress on a regular file and a function that is process-blocking for
regular files attempts to begin an I/O operation on the same open file.
If the fcntl() function is thread-aware, the [EALREADY] value is not returned.
[EBADF] One of these conditions exists:
The request parameter is F_SETLK, F_SETLK64, F_SETLKW,or
F_SETLKW64, the type of lock is shared (F_RDLCK), and filedes is
not a valid file descriptor open for reading.
The type of lock is exclusive (F_WRLCK), and filedes is not a valid file
descriptor open for writing.
The filedes parameter is not a valid open file 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 peer socket forcibly closed the connection.
The file descriptor specified by the filedes parameter can only be closed.
[EFAULT] The argument2 parameter is an invalid address.
[EINTR] The request parameter is F_SETLKW or F_SETLKW64, and the fcntl( ) func-
tion was interrupted by a signal that was caught.
316 Hewlett-Packard Company 527186-023