Home | History | Annotate | Download | only in lib

Lines Matching defs:pipes

172 // pipes[2]: stdin, stdout of new process, only allocated if zero on way in,
175 pid_t xpopen_both(char **argv, int *pipes)
179 // Make the pipes? Note this won't set either pipe to 0 because if fds are
181 if (pipes) {
183 if (pipes[pid] != 0) continue;
185 pipes[pid] = cestnepasun[pid+1];
192 if (pipes) {
195 if (pipes[1] != -1) close(cestnepasun[2]);
196 if (pipes[0] != -1) {
203 if (pipes[1] != -1) {
234 if (pipes) {
235 if (pipes[0] != -1) close(cestnepasun[0]);
236 if (pipes[1] != -1) close(cestnepasun[3]);
252 int xpclose_both(pid_t pid, int *pipes)
254 if (pipes) {
255 close(pipes[0]);
256 close(pipes[1]);
265 int pipes[2], pid;
267 pipes[!stdout] = -1;
268 pipes[!!stdout] = 0;
269 pid = xpopen_both(argv, pipes);
270 *pipe = pid ? pipes[!!stdout] : -1;