|
PatchworkOS
|
Go to the source code of this file.
Data Structures | |
| struct | cmd_t |
| struct | pipeline_t |
Functions | |
| uint64_t | pipeline_init (pipeline_t *pipeline, const char *cmdline) |
| void | pipeline_deinit (pipeline_t *pipeline) |
| uint64_t | pipeline_execute (pipeline_t *pipeline) |
| void pipeline_deinit | ( | pipeline_t * | pipeline | ) |
Definition at line 275 of file pipeline.c.
References pipeline_t::amount, cmd_t::argv, close(), pipeline_t::cmds, free(), pipeline_t::globalStdin, NULL, PIPE_READ, PIPE_WRITE, cmd_t::shouldCloseStderr, cmd_t::shouldCloseStdin, cmd_t::shouldCloseStdout, cmd_t::stderr, cmd_t::stdin, and cmd_t::stdout.
Referenced by interactive_execute_command().
| uint64_t pipeline_execute | ( | pipeline_t * | pipeline | ) |
Definition at line 442 of file pipeline.c.
References pipeline_t::amount, atoi, buffer, calloc(), CLOCKS_NEVER, close(), pipeline_t::cmds, ERR, errno, pollfd_t::events, EXIT_FAILURE, pollfd_t::fd, free(), pipeline_t::globalStdin, malloc(), MAX_PATH, memmove(), NULL, openf(), PIPE_WRITE, pipeline_execute_cmd(), poll(), POLLERR, POLLIN, printf(), read(), pipeline_t::status, STDIN_FILENO, strerror(), write(), and writef().
Referenced by execute_command(), and interactive_execute_command().
| uint64_t pipeline_init | ( | pipeline_t * | pipeline, |
| const char * | cmdline | ||
| ) |
Definition at line 17 of file pipeline.c.
References pipeline_t::amount, cmd_t::argc, argsplit(), cmd_t::argv, pipeline_t::capacity, close(), pipeline_t::cmds, ERR, errno, free(), pipeline_t::globalStdin, malloc(), NULL, open(), open2(), PIPE_READ, PIPE_WRITE, printf(), cmd_t::shouldCloseStderr, cmd_t::shouldCloseStdin, cmd_t::shouldCloseStdout, pipeline_t::status, cmd_t::stderr, STDERR_FILENO, cmd_t::stdin, cmd_t::stdout, STDOUT_FILENO, strcmp(), strdup(), strerror(), and UINT64_MAX.
Referenced by execute_command(), and interactive_execute_command().