[PATCH man page update (added splice and tee)
[splice.git] / tee.2
CommitLineData
8d2541ed
JA
1.TH tee 2 2006-04-28 "Linux 2.6.17" "Linux Programmer's Manual"
2.SH NAME
3tee \- duplicating pipe content.
4.SH SYNOPSIS
5.B #include <sys/splice.h>
6
7.B long tee(int fd_in, int fd_out, size_t bytes, unsigned int flags);
8
9.SH DESCRIPTION
10.BR tee ()
11duplicates at most
12.I bytes
13of content from pipe
14.I fd_in
15to pipe
16.IR fd_out .
17.I flags
18is a series of modifier flags, which share the name space with
19.BR splice (2)
20and
21.BR vmsplice (2):
22
23.TP 1.9i
24.B SPLICE_F_MOVE
25See
26.BR splice (2)
27.TP
28.B SPLICE_F_NONBLOCK
29Do not block on io.
30.TP
31.B SPLICE_F_MORE
32More data will be coming in a subsequent splice.
33.TP
34.B SPLICE_F_GIFT
35See
36.BR vmsplice (2)
37
38.PP
39.BR tee ()
40doesn't copy any data around, it simply references the input data and
41links it to the output pipe.
42
43.SH RETURN VALUE
44Upon successful completion,
45.BR tee ()
46shall return the number of bytes that was duplicated between the input
47and output. Otherwise, it shall return a value of -1 and
48.I errno
49shall be set to indicate an error.
50
51.SH ERRORS
52.TP 1.1i
53.B EBADF
54.I fd
55either not valid, or none of the descriptors refer to a pipe.
56.TP
57.B EINVAL
58Target file system doesn't support splicing, none of the descriptors refer
59to a pipe or offset given for non-seekable device.
60
61.SH SEE ALSO
62.BR splice (2),
63.BR vmsplice (2)
64
65.SH AUTHORS
66Jens Axboe <axboe@suse.de>