From 0e8704ae994c30f67a341dfe39267fd2d0086971 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 21 Nov 2010 06:13:41 +0100 Subject: [PATCH] fcntl.2: Add notes on fcntl64() Signed-off-by: Michael Kerrisk --- man2/fcntl.2 | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/man2/fcntl.2 b/man2/fcntl.2 index 18e8d2632..528ce200a 100644 --- a/man2/fcntl.2 +++ b/man2/fcntl.2 @@ -58,7 +58,7 @@ .\" 2010-06-17, Michael Kerrisk .\" Document F_SETPIPE_SZ and F_GETPIPE_SZ. .\" -.TH FCNTL 2 2010-11-01 "Linux" "Linux Programmer's Manual" +.TH FCNTL 2 2010-11-20 "Linux" "Linux Programmer's Manual" .SH NAME fcntl \- manipulate file descriptor .SH SYNOPSIS @@ -1184,6 +1184,28 @@ macro to obtain these definitions.) .\" .PP .\" SVr4 documents additional EIO, ENOLINK and EOVERFLOW error conditions. .SH NOTES +The original Linux +.BR fcntl () +system call was not designed to handle large file offsets +(in the +.I flock +structure). +Consequently, +an +.BR fcntl64 () +system call was added in Linux 2.4. +The newer system call employs a different structure for file locking, +.IR flock64 , +and corresponding commands, +.BR F_GETLK64 , +.BR F_SETLK64 , +and +.BR F_SETLKW64 . +However, these details can be ignored by applications using glibc, whose +.BR fcntl () +wrapper function transparently employs the more recent system call +where it is available. + The errors returned by .BR dup2 (2) are different from those returned by