Commit | Line | Data |
---|---|---|
8d2541ed JA |
1 | .TH tee 2 2006-04-28 "Linux 2.6.17" "Linux Programmer's Manual" |
2 | .SH NAME | |
3 | tee \- 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 () | |
11 | duplicates at most | |
12 | .I bytes | |
13 | of content from pipe | |
14 | .I fd_in | |
15 | to pipe | |
16 | .IR fd_out . | |
17 | .I flags | |
18 | is a series of modifier flags, which share the name space with | |
19 | .BR splice (2) | |
20 | and | |
21 | .BR vmsplice (2): | |
22 | ||
23 | .TP 1.9i | |
24 | .B SPLICE_F_MOVE | |
25 | See | |
26 | .BR splice (2) | |
27 | .TP | |
28 | .B SPLICE_F_NONBLOCK | |
29 | Do not block on io. | |
30 | .TP | |
31 | .B SPLICE_F_MORE | |
32 | More data will be coming in a subsequent splice. | |
33 | .TP | |
34 | .B SPLICE_F_GIFT | |
35 | See | |
36 | .BR vmsplice (2) | |
37 | ||
38 | .PP | |
39 | .BR tee () | |
40 | doesn't copy any data around, it simply references the input data and | |
41 | links it to the output pipe. | |
42 | ||
43 | .SH RETURN VALUE | |
44 | Upon successful completion, | |
45 | .BR tee () | |
46 | shall return the number of bytes that was duplicated between the input | |
47 | and output. Otherwise, it shall return a value of -1 and | |
48 | .I errno | |
49 | shall be set to indicate an error. | |
50 | ||
51 | .SH ERRORS | |
52 | .TP 1.1i | |
53 | .B EBADF | |
54 | .I fd | |
55 | either not valid, or none of the descriptors refer to a pipe. | |
56 | .TP | |
57 | .B EINVAL | |
58 | Target file system doesn't support splicing, none of the descriptors refer | |
59 | to 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 | |
66 | Jens Axboe <axboe@suse.de> |