exit status Macro

This commit is contained in:
LuckyLaszlo
2021-11-29 12:42:52 +01:00
parent cb5c2dcb30
commit 33f4878f36
3 changed files with 11 additions and 11 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/11/16 01:57:38 by lperrey #+# #+# */
/* Updated: 2021/11/18 13:20:20 by lperrey ### ########.fr */
/* Updated: 2021/11/29 12:35:02 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -42,7 +42,7 @@ int cmd_find_access(t_cmd *cmd, char *path[])
return (0);
if (!cmd->path)
{
cmd->error = 127;
cmd->error = EXIT_CMD_NOT_FOUND;
ft_putstr_fd("minishell: ", 2);
ft_putstr_fd(cmd->argv[0], 2);
ft_putstr_fd(": command not found\n", 2);
@@ -107,7 +107,7 @@ static int handle_access_error(char *file_name)
ft_perror_io("minishell: ", file_name);
errno = tmp;
if (errno == EACCES)
return (127);
return (EXIT_CMD_NOT_FOUND);
return (1);
// 126
// 126 / EXIT_CMD_NOT_EXE
}