refactoring exec
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
|
||||
/* Updated: 2021/11/29 12:43:52 by lperrey ### ########.fr */
|
||||
/* Updated: 2021/12/01 16:49:37 by lperrey ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
@@ -22,7 +22,7 @@ int pipeline(t_all *c)
|
||||
return (0);
|
||||
if (!pipeline_find_access(c->pipeline, c->path))
|
||||
return (0);
|
||||
if (ft_2d_arrlen(c->pipeline) == 1 && c->pipeline[0]->builtin_func)
|
||||
if (ft_2d_arrlen(c->pipeline) == 1 && c->pipeline[0]->builtin_f)
|
||||
simple_command_builtin(c->pipeline[0], c);
|
||||
else
|
||||
wait_subshell(pipeline_exec(c->pipeline, c));
|
||||
@@ -69,8 +69,6 @@ static int pipeline_find_access(t_cmd *pipeline[], char *path[])
|
||||
return (1);
|
||||
}
|
||||
|
||||
// TODO : Change exit status as in documentation :
|
||||
// https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02
|
||||
static pid_t pipeline_exec(t_cmd *pipeline[], t_all *c)
|
||||
{
|
||||
int i;
|
||||
|
||||
Reference in New Issue
Block a user