Lines Matching defs:output
51 * Description: Executes the given command and returns the output written to
55 * case that the command output is expected to be lengthy.
59 * - int *output_filedes - The file descriptor to which the stdout output
61 * - int *err_filedes - The file descriptor to which the stderr output
67 * execution of a command with a large amount of output (ex: ls of a large
82 int output[2];
86 if (pipe(output) == -1) {
106 close(output[0]);
110 * Close stdout and dup to output[1]
116 if (dup(output[1]) == -1) {
120 close(output[1]);
150 close(output[1]);
153 *output_filedes = output[0];
167 * Description: Executes the given string and returns the output as it is
168 * output as it is written to stdout and stderr in the return string.
176 * char * - The output of the command to stderr and stdout.
181 int output[2];
187 if (pipe(output) == -1) {
205 close(output[0]);
208 * Close stdout and dup to output[1]
215 if (dup(output[1]) == -1) {
221 * Close stderr and dup to output[1]
228 if (dup(output[1]) == -1) {
233 close(output[1]);
251 close(output[1]);
257 ret_val = cmd_retrieve_string(output[0], &err);
266 ret_val = cmd_retrieve_string(output[0], &err);