Home
last modified time | relevance | path

Searched refs:stdout_pipe (Results 1 – 3 of 3) sorted by relevance

/src/contrib/libarchive/libarchive/
H A Dfilter_fork_posix.c78 int stdin_pipe[2], stdout_pipe[2], tmp; in __archive_create_child() local
107 if (pipe(stdout_pipe) == -1) in __archive_create_child()
109 if (stdout_pipe[1] == 0 /* stdin */) { in __archive_create_child()
110 if ((tmp = dup(stdout_pipe[1])) == -1) in __archive_create_child()
112 close(stdout_pipe[1]); in __archive_create_child()
113 stdout_pipe[1] = tmp; in __archive_create_child()
136 r = posix_spawn_file_actions_addclose(&actions, stdout_pipe[0]); in __archive_create_child()
149 r = posix_spawn_file_actions_adddup2(&actions, stdout_pipe[1], 1); in __archive_create_child()
152 if (stdout_pipe[1] != 1 /* stdout */) { in __archive_create_child()
153 r = posix_spawn_file_actions_addclose(&actions, stdout_pipe[1]); in __archive_create_child()
[all …]
/src/libexec/flua/lfbsd/
H A Dlfbsd.c94 int stdout_pipe[2] = {-1, -1}; in lua_exec() local
109 if (capture_stdout && pipe(stdout_pipe) < 0) { in lua_exec()
119 proc->stdout_fileno = stdout_pipe[1]; in lua_exec()
130 if (stdout_pipe[0] != -1) { in lua_exec()
131 posix_spawn_file_actions_adddup2(&action, stdout_pipe[0], in lua_exec()
133 posix_spawn_file_actions_addclose(&action, stdout_pipe[1]); in lua_exec()
134 if (stdout_pipe[0] != STDOUT_FILENO) { in lua_exec()
136 stdout_pipe[0]); in lua_exec()
144 close_pipes(stdout_pipe); in lua_exec()
157 if (stdout_pipe[0] != -1) in lua_exec()
[all …]
/src/usr.sbin/cron/cron/
H A Ddo_command.c118 int stdin_pipe[2], stdout_pipe[2]; in child_process() local
239 if (pipe(stdin_pipe) != 0 || pipe(stdout_pipe) != 0) { in child_process()
347 close(stdout_pipe[READ_PIPE]); in child_process()
353 close(STDOUT); dup2(stdout_pipe[WRITE_PIPE], STDOUT); in child_process()
359 close(stdout_pipe[WRITE_PIPE]); in child_process()
539 close(stdout_pipe[WRITE_PIPE]); in child_process()
568 close(stdout_pipe[READ_PIPE]); in child_process()
618 FILE *in = fdopen(stdout_pipe[READ_PIPE], "r"); in child_process()