1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <libft.h> #include <minishell.h> #include <unistd.h> int ft_exec(char **app) { uint8_t i; i = 0; while (app[i]) i++; if (i < 2) return (execve(app[0] + 2, NULL, NULL)); else return (execve(app[0] + 2, &app[1], NULL)); return (0); }