feat: Redirections applied

Now redirections work.
> redirects to a file
< reads the content of a file and set it to the input of a command
>> append the output of a command into a file
This commit is contained in:
marcnava-42cursus
2026-02-12 20:28:05 +01:00
parent 3c7ee5b161
commit 6bc2eab19b
8 changed files with 141 additions and 1 deletions

View File

@@ -52,5 +52,9 @@ extern void executor_child_process(t_list *node, t_pipeline *pl,
extern void executor_parent_cleanup(t_list *node, t_pipeline *pl);
extern uint8_t executor_wait_for_children(pid_t last_child_pid);
extern void executor_cmdfree(t_command *command);
extern bool executor_apply_redirections(const t_command *command,
int *saved_stdin, int *saved_stdout);
extern void executor_restore_redirections(int saved_stdin,
int saved_stdout);
#endif /* EXECUTOR_H */