projects
/
42
/
minishell.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
74e3e8c
)
Write generic error to stderr
trunk
author
Lukas Jiriste
<ljiriste@student.42prague.com>
Thu, 5 Sep 2024 07:47:59 +0000
(09:47 +0200)
committer
Lukas Jiriste
<ljiriste@student.42prague.com>
Thu, 5 Sep 2024 07:47:59 +0000
(09:47 +0200)
src/input_handling.c
patch
|
blob
|
history
diff --git
a/src/input_handling.c
b/src/input_handling.c
index 5347db0a80e3d238afc02eb24c70c2daba78c6f4..1337955f5e246816a5b0b2cea2b43cfbefbc72ef 100644
(file)
--- a/
src/input_handling.c
+++ b/
src/input_handling.c
@@
-6,7
+6,7
@@
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/03 09:00:00 by ljiriste #+# #+# */
/* By: ljiriste <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/05/03 09:00:00 by ljiriste #+# #+# */
-/* Updated: 2024/0
8/31 11:58:46
by ljiriste ### ########.fr */
+/* Updated: 2024/0
9/05 09:41:13
by ljiriste ### ########.fr */
/* */
/* ************************************************************************** */
/* */
/* ************************************************************************** */
@@
-14,6
+14,7
@@
#include "minishell.h"
#include "libft.h"
#include <stdlib.h>
#include "minishell.h"
#include "libft.h"
#include <stdlib.h>
+#include <unistd.h>
void handle_input(char **input, t_execution_env *env)
{
void handle_input(char **input, t_execution_env *env)
{
@@
-40,6
+41,6
@@
void handle_input(char **input, t_execution_env *env)
ft_vec_free(&tokens, free_token);
ft_parse_tree_free(parse_tree);
if (res != 0)
ft_vec_free(&tokens, free_token);
ft_parse_tree_free(parse_tree);
if (res != 0)
- ft_
printf(
"An error has occured.\n");
+ ft_
dprintf(STDERR_FILENO,
"An error has occured.\n");
return ;
}
return ;
}