summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-05-11 16:06:45 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-05-11 16:06:45 +0200
commit456ea302cb8282f52403973893d8359d9f1f0717 (patch)
tree6d25c8db8f9ea7f49974955449ac58c1506c57be
parentNew files (diff)
download42-minishell-456ea302cb8282f52403973893d8359d9f1f0717.tar.gz
42-minishell-456ea302cb8282f52403973893d8359d9f1f0717.tar.bz2
42-minishell-456ea302cb8282f52403973893d8359d9f1f0717.tar.xz
42-minishell-456ea302cb8282f52403973893d8359d9f1f0717.tar.zst
42-minishell-456ea302cb8282f52403973893d8359d9f1f0717.zip
Removed bloat
-rw-r--r--src/ft_e_externs.c7
-rw-r--r--src/ft_e_pipes.c3
2 files changed, 4 insertions, 6 deletions
diff --git a/src/ft_e_externs.c b/src/ft_e_externs.c
index 07bd9e1..9302d18 100644
--- a/src/ft_e_externs.c
+++ b/src/ft_e_externs.c
@@ -27,14 +27,9 @@ static void
t_lcom *ptr,
t_msh *msh)
{
- int32_t ret;
-
ft_dup_redirs(ptr, msh);
- ret = execve(fullpath, ptr->argv, msh->envp);
+ execve(fullpath, ptr->argv, msh->envp);
/* TODO: handle execve failed */
- ft_lcom_clear(&msh->curr);
- ft_s_destroy(msh);
- exit(ret);
}
static void
diff --git a/src/ft_e_pipes.c b/src/ft_e_pipes.c
index 81c8a08..2ac4bb6 100644
--- a/src/ft_e_pipes.c
+++ b/src/ft_e_pipes.c
@@ -11,6 +11,8 @@
/* ************************************************************************** */
#include <libft.h>
+#include <stdint.h>
+#include <unistd.h>
#include "ft_e_builtins.h"
#include "ft_e_externs.h"
@@ -37,6 +39,7 @@ void
t_msh *msh)
{
uint8_t bu_id;
+ /* int32_t pipefd[2]; */
if ((bu_id = ft_get_builtin_id(ptr->pipes->one->com, msh))
< FT_BUILTINS_COUNT)