|
solidc
Robust collection of general-purpose cross-platform C libraries and data structures designed for rapid and safe development in C
|
Data pipeline utilities for processing streams. More...
#include <fcntl.h>#include <sys/wait.h>#include <unistd.h>Go to the source code of this file.
Classes | |
| struct | CommandNode |
| Structure representing a command in a pipeline. More... | |
Typedefs | |
| typedef struct CommandNode | CommandNode |
| Structure representing a command in a pipeline. | |
Functions | |
| CommandNode * | create_command_node (char **args) |
| Create a new CommandNode. | |
| void | execute_pipeline (CommandNode *head, int output_fd) |
| Execute a pipeline of commands. | |
| void | free_pipeline (CommandNode *head) |
| Free the linked list of commands. | |
| void | build_pipeline (CommandNode **commands) |
| Build the pipeline using a NULL-terminated array of CommandNode pointers. | |
Data pipeline utilities for processing streams.
Definition in file pipeline.h.
| void build_pipeline | ( | CommandNode ** | commands | ) |
Build the pipeline using a NULL-terminated array of CommandNode pointers.
| commands | Array of CommandNode pointers, terminated by NULL. |
Definition at line 250 of file pipeline.c.
References build_pipeline().
Referenced by build_pipeline().
| CommandNode * create_command_node | ( | char ** | args | ) |
Create a new CommandNode.
| args | Array of command arguments (NULL-terminated). |
Definition at line 19 of file pipeline.c.
References create_command_node().
Referenced by create_command_node().
| void execute_pipeline | ( | CommandNode * | head, |
| int | output_fd | ||
| ) |
Execute a pipeline of commands.
| head | Pointer to the first CommandNode in the pipeline. |
| output_fd | Optional file descriptor to capture the output of the last command. If -1, the output is not redirected. |
Execute a pipeline of commands.
| head | Pointer to the first CommandNode in the pipeline. |
| output_fd | Optional file descriptor to capture the output of the last command. If -1, the output is not redirected. |
Definition at line 165 of file pipeline.c.
References execute_pipeline().
Referenced by execute_pipeline().
| void free_pipeline | ( | CommandNode * | head | ) |
Free the linked list of commands.
| head | Pointer to the first CommandNode in the pipeline. |
Definition at line 235 of file pipeline.c.
References free_pipeline().
Referenced by free_pipeline().