1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
.\" This man page is Copyright (C) 1998 Pawel Krawczyk.
.\" Permission is granted to distribute possibly modified copies
.\" of this page provided the header is included verbatim,
.\" and in case of nontrivial modification author and date
.\" of the modification is added to the header.
.\" $Id: sendfile.2,v 1.3 1999/12/26 14:43:41 hanataka Exp $
.\"
.\" Japanese Version Copyright (c) 1999 HANATAKA Shinya
.\" all rights reserved.
.\" Translated Sat Jun 26 00:00:15 JST 1999
.\" by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\"
.\"WORD: descriptor ǥץ
.\"WORD: socket å
.\"WORD: lock å
.\"
.TH SENDFILE 2 "1 Dec 1998" "Linux Man Page" "Linux Programmer's Manual"
.SH ̾
sendfile \- ե롦ǥץ֤ǥǡž
.SH
.B #include <unistd.h>
.sp
.BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" offset ", size_t" " count" )
.\" The below is too ugly. Comments about glibc versions belong
.\" in the notes, not in the header.
.\" Moreover, all system calls should be defined in <unistd.h>.
.\"
.\" .B #include <features.h>
.\" .br
.\" .B #if (__GLIBC__==2 && __GLIBC_MINOR__>=1) || __GLIBC__>2
.\" .br
.\" .B #include <sys/sendfile.h>
.\" .br
.\" #else
.\" .br
.\" .B #include <sys/types.h>
.\" .br
.\" .B /* No system prototype before glibc 2.1. */
.\" .br
.\" .BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" offset ", size_t" " count" )
.\" .br
.\" .B #endif
.\"
.SH
ΥƥॳϤե롦ǥץ̤
ե롦ǥץإǡԡ롣
ޤξΥե롦ǥץåȤǤʤ
.I in_fd
ɤ߹ߤΤ˥ץ줿ե롦ǥץ
ʤФʤ餺
.I out_fd
ϽߤΤ˥ץƤʤФʤʤ
.I offset
.BR sendfile (2)
ϥեΤɤǡɤϤ뤫ؤΥݥǤ롣
.B sendfile
λˡѿ˺Ǹɤ߹ޤ줿ХȤμΥХ
ȤΥեåȤޤ롣
.I count
ϥե롦ǥץ֤ԡХȿǤ롣
.SH
sendfile
.IR in_fd
θߤΥե롦ݥѹʤ
.IR out_fd
Υե롦ݥѹ롣
⤷ TCP åȤ˥ե뤿 sendfile Ȥȷײ褷Ƥꡢ
եƤ˥إåǡդäɬפʤ
ѥåȤοǾˤƸΨ夲뤿
.BR tcp (7)
˵ҤƤ
.B TCP_CORK
ץȤȤ褤
.SH ֤
ž
.I out_fd
˽ޤ줿Хȿ֤롣顼ξ \-1 ֤졢
.I errno
Ŭڤͤꤵ롣
.SH 顼
.TP
.B EBADF
ϥե뤬ɤ߹ߤΤ˥ץƤʤ
ϥե뤬ߤΤ˥ץƤʤ
.TP
.B EINVAL
ǥץͭǤʤå(lock)Ƥ롣
.\" These two are from do_generic_file_read() in filemap.c
.TP
.B ENOMEM
.I in_fd
ɤ߹िνʬʥ꤬ʤ
.TP
.B EIO
.I in_fd
ɤ߹Ǥ뤦ͽʤ顼
.SH С
.B sendfile
Linux 2.2 οǽǤ롣
¾ Unix ǤϤФаۤäץȥפ
.B sendfile
Ƥ롣ܿθץǤϻѤƤϤʤʤ
.SH Ϣ
.BR socket (2),
.BR open (2)
|