a jour avec la branche master

This commit is contained in:
hugogogo
2021-12-17 17:48:22 +01:00
5 changed files with 98 additions and 69 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/12/11 05:24:07 by lperrey ### ########.fr */
/* Updated: 2021/12/16 15:55:36 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -73,7 +73,7 @@ static int pipeline_find_access(t_cmd *pipeline[], char *path[])
i = 0;
while (pipeline[i])
{
if (!pipeline[i]->error)
if (!pipeline[i]->error && pipeline[i]->argv[0])
{
if (!cmd_find_access(pipeline[i], path))
return (0);
@@ -91,7 +91,7 @@ static pid_t pipeline_exec(t_cmd *pipeline[], t_all *c)
i = 0;
while (pipeline[i])
{
if (!pipeline[i]->error)
if (!pipeline[i]->error && pipeline[i]->argv[0])
{
ret = cmd_exec_in_subshell(pipeline[i], c);
if (ret != EXIT_SUCCESS)