Home | History | Annotate | Download | only in sendfile

Lines Matching refs:out_fd

27  *	when passing blocked out_fd. Here out_fd is opend with O_NONBLOCK.
30 * 1. Make sockets with socketpair(&p). Use p[1] as out_fd.
31 * 2. Set O_NONBLOCK flag of out_fd on.
32 * 3. Write much datum to out_fd till write() returns EAGAIN.
33 * 4. Call sendfile with out_fd, and expect EAGAIN.
65 int in_fd, out_fd = 0, ignored_fd = 0;
68 /* To make out_fd overflow, write much chars
69 to out_fd. MAX_FILL_DATA_LENGTH defines the `much'. */
89 TEST(sendfile(out_fd, in_fd, NULL, 1));
141 /* Make fulfilled out_fd. */
147 You cannot write nothing on out_fd if ignored_fd is closed. */
149 out_fd = p[1];
150 if (fcntl(out_fd, F_SETFL, O_WRONLY | O_NONBLOCK) < 0) {
156 r = write(out_fd, buf, 1);
162 "write failed to fill out_fd, errno: %d",
170 "fail to fill out_fd, write %d bytes but EAGAIN it not returned.",
185 if (out_fd)
186 close(out_fd);