.\" 2010-06-17, Michael Kerrisk
.\" Document F_SETPIPE_SZ and F_GETPIPE_SZ.
.\"
-.TH FCNTL 2 2012-03-25 "Linux" "Linux Programmer's Manual"
+.TH FCNTL 2 2012-04-15 "Linux" "Linux Programmer's Manual"
.SH NAME
fcntl \- manipulate file descriptor
.SH SYNOPSIS
The required argument type is indicated in parentheses after each
.I cmd
name (in most cases, the required type is
-.IR long ,
+.IR int ,
and we identify the argument using the name
.IR arg ),
or
is specified if the argument is not required.
.SS "Duplicating a file descriptor"
.TP
-.BR F_DUPFD " (\fIlong\fP)"
+.BR F_DUPFD " (\fIint\fP)"
Find the lowest numbered available file descriptor
greater than or equal to
.I arg
.BR dup (2)
for further details.
.TP
-.BR F_DUPFD_CLOEXEC " (\fIlong\fP; since Linux 2.6.24)"
+.BR F_DUPFD_CLOEXEC " (\fIint\fP; since Linux 2.6.24)"
As for
.BR F_DUPFD ,
but additionally set the
.I arg
is ignored.
.TP
-.BR F_SETFD " (\fIlong\fP)"
+.BR F_SETFD " (\fIint\fP)"
Set the file descriptor flags to the value specified by
.IR arg .
.SS "File status flags"
.I arg
is ignored.
.TP
-.BR F_SETFL " (\fIlong\fP)"
+.BR F_SETFL " (\fIint\fP)"
Set the file status flags to the value specified by
.IR arg .
File access mode
.I arg
is ignored.
.TP
-.BR F_SETOWN " (\fIlong\fP)"
+.BR F_SETOWN " (\fIint\fP)"
Set the process ID or process group ID that will receive
.B SIGIO
and
.I arg
is ignored.
.TP
-.BR F_SETSIG " (\fIlong\fP)"
+.BR F_SETSIG " (\fIint\fP)"
Set the signal sent when input or output becomes possible
to the value given in
.IR arg .
.BR truncate (2)
the file referred to by that file descriptor.
.TP
-.BR F_SETLEASE " (\fIlong\fP)"
+.BR F_SETLEASE " (\fIint\fP)"
Set or remove a file lease according to which of the following
values is specified in the integer
.IR arg :
.I /proc/sys/fs/lease-break-time
then the kernel forcibly removes or downgrades the lease holder's lease.
+Once a lease break has been initiated,
+.B F_GETLEASE
+returns the target lease type (either
+.B F_RDLCK
+or
+.BR F_UNLCK ,
+depending on what would be compatible with the lease breaker)
+until the lease holder voluntarily downgrades or removes the lease or
+the kernel forcibly does so after the lease break timer expires.
+
Once the lease has been voluntarily or forcibly removed or downgraded,
and assuming the lease breaker has not unblocked its system call,
the kernel permits the lease breaker's system call to proceed.
(This is useful if the caller holds leases against multiple files).
.SS "File and directory change notification (dnotify)"
.TP
-.BR F_NOTIFY " (\fIlong\fP)"
+.BR F_NOTIFY " (\fIint\fP)"
(Linux 2.4 onward)
Provide notification when the directory referred to by
.I fd
.BR inotify (7).
.SS "Changing the capacity of a pipe"
.TP
-.BR F_SETPIPE_SZ " (\fIlong\fP; since Linux 2.6.35)"
+.BR F_SETPIPE_SZ " (\fIint\fP; since Linux 2.6.35)"
Change the capacity of the pipe referred to by
.I fd
to be at least