Lines Matching full:pipes
200 // pipes[2]: stdin, stdout of new process, only allocated if zero on way in,
203 pid_t xpopen_both(char **argv, int *pipes)
207 // Make the pipes? Note this won't set either pipe to 0 because if fds are
209 if (pipes) {
211 if (pipes[pid] != 0) continue;
213 pipes[pid] = cestnepasun[pid+1];
220 if (pipes) {
223 if (pipes[1] != -1) close(cestnepasun[2]);
224 if (pipes[0] != -1) {
231 if (pipes[1] != -1) {
262 if (pipes) {
263 if (pipes[0] != -1) close(cestnepasun[0]);
264 if (pipes[1] != -1) close(cestnepasun[3]);
280 int xpclose_both(pid_t pid, int *pipes)
282 if (pipes) {
283 close(pipes[0]);
284 close(pipes[1]);
293 int pipes[2], pid;
295 pipes[!isstdout] = -1;
296 pipes[!!isstdout] = 0;
297 pid = xpopen_both(argv, pipes);
298 *pipe = pid ? pipes[!!isstdout] : -1;