diff options
| author | Dominik Kaiser | 2025-01-16 19:16:44 +0100 |
|---|---|---|
| committer | Dominik Kaiser | 2025-01-16 19:16:44 +0100 |
| commit | 3392f2b811269f174620832d663b09ef4f4e43f3 (patch) | |
| tree | f19d804b37896ea1aca7c3abe4d639e86154d0fe /src/interpreter.c | |
| parent | 1032eefe7247cc5c240feedd2f49d8d69a326d79 (diff) | |
| download | minishell-3392f2b811269f174620832d663b09ef4f4e43f3.tar.gz minishell-3392f2b811269f174620832d663b09ef4f4e43f3.zip | |
Create files
Diffstat (limited to 'src/interpreter.c')
| -rw-r--r-- | src/interpreter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/interpreter.c b/src/interpreter.c index 0a6d781..c7fe67c 100644 --- a/src/interpreter.c +++ b/src/interpreter.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:15:49 by chuhlig #+# #+# */ -/* Updated: 2025/01/15 18:10:25 by dkaiser ### ########.fr */ +/* Updated: 2025/01/16 18:44:39 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -30,7 +30,7 @@ int handle_redirections(t_redirection *redirs) } else if (redirs[0].type == INPUT_LIMITER) { - fd = open("/tmp/heredoc_tmp", O_WRONLY | O_CREAT | O_TRUNC, 0644); + fd = open("/tmp/heredoc_tmp", O_WRONLY | O_TRUNC, 0644); if (fd < 0) { perror("open"); @@ -49,7 +49,7 @@ int handle_redirections(t_redirection *redirs) } if (redirs[1].type == OUTPUT_OVERRIDE) { - fd = open(redirs[1].specifier, O_WRONLY | O_CREAT | O_TRUNC, 0644); + fd = open(redirs[1].specifier, O_WRONLY | O_TRUNC, 0644); if (fd < 0) { perror("open"); @@ -60,7 +60,7 @@ int handle_redirections(t_redirection *redirs) } else if (redirs[1].type == OUTPUT_APPEND) { - fd = open(redirs[1].specifier, O_WRONLY | O_CREAT | O_APPEND, 0644); + fd = open(redirs[1].specifier, O_WRONLY | O_APPEND, 0644); if (fd < 0) { perror("open"); |
