summaryrefslogtreecommitdiffstats
path: root/src/e_pipes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/e_pipes.c')
-rw-r--r--src/e_pipes.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/e_pipes.c b/src/e_pipes.c
index be647b9..1b4e314 100644
--- a/src/e_pipes.c
+++ b/src/e_pipes.c
@@ -87,10 +87,21 @@ static void e_pipe_exec_path(char *fullpath[],
msh->ret = WEXITSTATUS(status);
}
+/* static void e_fullpath_not_found(t_com *ptr, t_msh *msh) */
+/* { */
+/* f_command_not_found(ptr->bin); */
+/* u_eof_fd(msh->fd); */
+/* s_com_destroy(&msh->com); */
+/* s_line_clear(&msh->curr); */
+/* s_destroy(msh); */
+/* exit(127); */
+/* } */
+
static char *e_get_current_path(struct s_lpipes *rptr, t_msh *msh)
{
char tmp[PATH_MAX];
char *path;
+ uint8_t fp_ret;
path = NULL;
if (rptr->com->bin != NULL && ft_ischarset("/.", rptr->com->bin[0]) == TRUE)
@@ -107,7 +118,7 @@ static char *e_get_current_path(struct s_lpipes *rptr, t_msh *msh)
}
else
{
- u_search_in_path(tmp, rptr->com->bin, PATH_MAX, msh);
+ fp_ret = u_search_in_path(tmp, rptr->com->bin, PATH_MAX, msh);
if ((path = ft_strdup(tmp)) == NULL)
f_alloc_and_destroy_msh(msh);
}
@@ -138,7 +149,6 @@ static char **e_get_fullpath(size_t pipes, t_msh *msh)
void e_pipes(t_msh *msh)
{
const size_t pipes = e_get_pipes_count(msh->pipes);
- char **fullpath;
fullpath = e_get_fullpath(pipes, msh);
e_pipe_exec_path(fullpath, pipes, msh);