Bug 5599 - sendfile.2 problems.
sendfile.2 problems.
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: man-pages (Show other bugs)
6.1
All Linux
medium Severity low
: ---
: ---
Assigned To: Trond Eivind Glomsrxd
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-10-05 16:23 EDT by hawkfan
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-30 12:52:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description hawkfan 1999-10-05 16:23:48 EDT
sendfile(2) returns a ssize_t.  The man page documents it as
returning an int.  Also unistd.h knows nothing about
sendfile, it needs only sys/sendfile.h.  Attached is a patch
that also cleans up some formatting errors.

--- sendfile.2.old      Tue Oct  5 15:22:36 1999
+++ sendfile.2  Tue Oct  5 15:25:32 1999
@@ -4,10 +4,12 @@
 .SH NAME
 sendfile \- transfer data between file descriptors
 .SH SYNOPSIS
-.B #include <unistd.h>
+.nf
+.B #include <sys/sendfile.h>
 .sp
-.BI int sendfile(int out_fd, int in_fd, off_t *offset,
size_t count)
-
+.BI "ssize_t sendfile(int " out_fd ", int " in_fd ", off_t
*" offset ,
+.BI "                 size_t " count );
+.fi
 .SH DESCRIPTION
 This call copies data between file descriptor and another
file descriptor
 or socket.
@@ -25,8 +27,8 @@
 is the number of bytes to copy between file descriptors.

 .SH NOTES
-Sendfile does not modify the current file pointer of
-in_fd, but does for out_fd.
+.RI "Sendfile does not modify the current file pointer of "
in_fd ,
+.RI "but does for " out_fd ".

 If you plan to use sendfile for sending files to a TCP
socket, but need
 to send some header data in front of the file contents,
please refer to
@@ -63,7 +65,9 @@
 .B sendfile
 is a new feature in Linux 2.2.

-Other Unixes often implement sendfile with different
semantics and prototypes. It should
-not be used in portable programs.
+Other Unixes often implement
+.B sendfile
+with different semantics and prototypes. It should not be
used in portable
+programs.
 .SH SEE ALSO
 .BR socket "(2), " open "(2)"
Comment 1 Cristian Gafton 2000-05-22 11:02:59 EDT
assigned to teg
Comment 2 Trond Eivind Glomsrxd 2000-05-30 12:52:59 EDT
Except from the include file, it seems fixed in 1.29. I fixed that.

Note You need to log in before you can comment on or make changes to this bug.