Lines Matching refs:pipes
227 pid_t xpopen_both(char **argv, int *pipes) in xpopen_both() argument
233 if (pipes) for (pid = 0; pid < 2; pid++) { in xpopen_both()
234 if (pipes[pid] != -1) continue; in xpopen_both()
241 if (pipes) { in xpopen_both()
248 pipes[1] = cestnepasun[3]; in xpopen_both()
254 pipes[0] = cestnepasun[0]; in xpopen_both()
258 if (!pipes[1]) pipes[1] = dup(0); in xpopen_both()
261 if (pipes[0]) { in xpopen_both()
262 dup2(pipes[0], 0); in xpopen_both()
263 close(pipes[0]); in xpopen_both()
267 if (pipes[1] != 1) { in xpopen_both()
268 dup2(pipes[1], 1); in xpopen_both()
269 close(pipes[1]); in xpopen_both()
298 if (pipes) { in xpopen_both()
300 pipes[0] = cestnepasun[1]; in xpopen_both()
304 pipes[1] = cestnepasun[2]; in xpopen_both()
322 int xpclose_both(pid_t pid, int *pipes) in xpclose_both() argument
324 if (pipes) { in xpclose_both()
325 close(pipes[0]); in xpclose_both()
326 close(pipes[1]); in xpclose_both()
335 int pipes[2], pid; in xpopen() local
337 pipes[0] = isstdout ? 0 : -1; in xpopen()
338 pipes[1] = isstdout ? -1 : 1; in xpopen()
339 pid = xpopen_both(argv, pipes); in xpopen()
340 *pipe = pid ? pipes[!!isstdout] : -1; in xpopen()