Lines Matching refs:fd
40 pipe2 (int fd[2], int flags) in pipe2()
46 tmp[0] = fd[0]; in pipe2()
47 tmp[1] = fd[1]; in pipe2()
58 int result = pipe2 (fd, flags); in pipe2()
79 if (_pipe (fd, 4096, flags & ~O_NONBLOCK) < 0) in pipe2()
81 fd[0] = tmp[0]; in pipe2()
82 fd[1] = tmp[1]; in pipe2()
92 if (set_nonblocking_flag (fd[0], true) != 0 in pipe2()
93 || set_nonblocking_flag (fd[1], true) != 0) in pipe2()
107 if (pipe (fd) < 0) in pipe2()
120 if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0 in pipe2()
121 || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1 in pipe2()
122 || (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0 in pipe2()
123 || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1) in pipe2()
131 if ((fcntl_flags = fcntl (fd[1], F_GETFD, 0)) < 0 in pipe2()
132 || fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1 in pipe2()
133 || (fcntl_flags = fcntl (fd[0], F_GETFD, 0)) < 0 in pipe2()
134 || fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1) in pipe2()
141 setmode (fd[1], O_BINARY); in pipe2()
142 setmode (fd[0], O_BINARY); in pipe2()
146 setmode (fd[1], O_TEXT); in pipe2()
147 setmode (fd[0], O_TEXT); in pipe2()
160 close (fd[0]); in pipe2()
161 close (fd[1]); in pipe2()
162 fd[0] = tmp[0]; in pipe2()
163 fd[1] = tmp[1]; in pipe2()