Lines Matching refs:pipes
225 pid_t xpopen_both(char **argv, int *pipes) in xpopen_both() argument
231 if (pipes) for (pid = 0; pid < 2; pid++) { in xpopen_both()
232 if (pipes[pid] != -1) continue; in xpopen_both()
238 if (pipes) { in xpopen_both()
243 pipes[1] = cestnepasun[3]; in xpopen_both()
247 pipes[0] = cestnepasun[0]; in xpopen_both()
251 if (!pipes[1]) pipes[1] = dup(pipes[1]); in xpopen_both()
254 if (pipes[0]) { in xpopen_both()
255 dup2(pipes[0], 0); in xpopen_both()
256 close(pipes[0]); in xpopen_both()
260 if (pipes[1] != 1) { in xpopen_both()
261 dup2(pipes[1], 1); in xpopen_both()
291 if (pipes) { in xpopen_both()
293 pipes[0] = cestnepasun[1]; in xpopen_both()
297 pipes[1] = cestnepasun[2]; in xpopen_both()
315 int xpclose_both(pid_t pid, int *pipes) in xpclose_both() argument
317 if (pipes) { in xpclose_both()
318 close(pipes[0]); in xpclose_both()
319 close(pipes[1]); in xpclose_both()
328 int pipes[2], pid; in xpopen() local
330 pipes[0] = isstdout ? 0 : -1; in xpopen()
331 pipes[1] = isstdout ? -1 : 1; in xpopen()
332 pid = xpopen_both(argv, pipes); in xpopen()
333 *pipe = pid ? pipes[!!isstdout] : -1; in xpopen()