File: sendfile.2

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (101 lines) | stat: -rw-r--r-- 3,130 bytes parent folder | download
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
.\" 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.7 2001/03/10 18:52:33 argrath Exp $
.\" 2000-11-19 bert hubert <ahu@ds9a.nl>: in_fd cannot be socket
.\"
.\" 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>
.\" Updated Fri Feb 16 JST 2001 by Kentaro Shirakata <argrath@ub32.org>
.\"
.\"WORD:	descriptor		ǥץ
.\"WORD:	socket			å
.\"WORD:	lock			å
.\"
.TH SENDFILE 2 "1 Dec 1998" "Linux Man Page" "Linux Programmer's Manual" 
.SH ̾
sendfile \- ե롦ǥץ֤ǥǡž
.SH 
.B #include <sys/sendfile.h>
.sp
.BI "ssize_t sendfile(int" " out_fd" ", int" " in_fd" ", off_t *" offset ", size_t" " count" );
.SH 
ΥƥॳϤե롦ǥץ̤
ե롦ǥץإǡ򥳥ԡ롣
ޤξΥե롦ǥץåȤǤ⹽ʤ
(âʲ򻲾ȤΤ)
.I in_fd
ɤ߹ߤΤ˥ץ󤵤줿ե롦ǥץ
ʤФʤ餺
.I out_fd
Ͻ񤭹ߤΤ˥ץ󤵤줿ǥץǤʤФʤʤ
.I offset

.BR sendfile ()
ϥեΤɤǡɤ߻Ϥ뤫ؤΥݥ󥿤Ǥ롣
.BR sendfile ()
λѿ˺Ǹɤ߹ޤ줿ХȤ
ΥХȤΥեåȤ񤭹ޤ롣
.I count
ϥե롦ǥץ֤򥳥ԡХȿǤ롣

ΥԡϥͥǹԤΤǡ
.BR sendfile ()
ϥ桼֤Ȥδ֤ǥǡž뤿˻֤Ȥɬפʤ

.SH 
sendfile 
.IR in_fd
θߤΥե롦ݥ󥿡ѹʤ
.IR out_fd
Υե롦ݥ󥿡ѹ롣

⤷ TCP åȤ˥ե뤿 sendfile Ȥȷײ褷Ƥꡢ
եƤ˥إåǡդäɬפ
ѥåȤοǾˤƸΨ夲뤿
.BR tcp (7)
˵ҤƤ
.B TCP_CORK 
ץ򻲾ȤȤ褤

ΤȤǡɤ߽ФǥץϥåȤȷӤĤƤƤϤʤ餺
mmap()եȷӤĤƤʤФʤʤ

.SH ֤
ž
.I out_fd
˽񤭹ޤ줿Хȿ֤롣顼ξ \-1 ֤졢
.I errno
Ŭڤͤꤵ롣

.SH 顼
.TP
.B EBADF
ϥե뤬ɤ߹ߤΤ˥ץ󤵤Ƥʤ
ϥե뤬񤭹ߤΤ˥ץ󤵤Ƥʤ
.TP
.B EINVAL
ǥץͭǤʤå(lock)Ƥ롣
.TP
.B ENOMEM
.I in_fd
ɤ߹िνʬʥ꤬ʤ
.TP
.B EIO
.I in_fd 
ɤ߹Ǥ뤦ͽʤ顼
.SH С
.B sendfile
 Linux 2.2 οǽǤ롣
󥯥롼ɥե <sys/sendfile.h>  glibc2.1 ¸ߤƤ롣

¾ Unix ǤϤФаۤʤäץȥפ
.B sendfile 
Ƥ롣ܿθץǤϻѤƤϤʤʤ
.SH Ϣ
.BR socket (2),
.BR open (2)