Commit e7a3cace authored by abenoit's avatar abenoit
Browse files

exit NAN exit

parent 39363f6b
......@@ -11,6 +11,7 @@ enum e_retcode
CLEAN_EXIT,
ARG_ERR,
FT_EXIT,
EXIT_NAN,
CHILD_EXIT,
CHILD_ERROR,
_ERRNO_MSG_,
......@@ -30,7 +31,6 @@ enum e_retcode
HOME_NOT_SET,
CD_ARG_ERR,
EXIT_ARG_ERR,
EXIT_NAN,
_PARSING_ERROR_,
SQUOTE_MISSING,
DQUOTE_MISSING,
......
......@@ -4,9 +4,6 @@ builtins: set stat_loc for all returns
arthur:
comportement simplifié ^D
EXIT_NAN -> exit anyway
masaki:
a la fin avec rgrep:
......
......@@ -28,8 +28,7 @@ int exec_error(int err_code, t_xe *xe)
"HOME not set",
"cd: too many arguments",
//"pwd : erreur de détermination du répertoire actuel : getcwd : ne peut accéder aux répertoires parents : Aucun fichier ou dossier de ce type",// -> moved to err_output
"exit: too many arguments",
"exit: bad argument"};
"exit: too many arguments"};
ft_putstr_fd("command error: ", STDERR_FILENO);
......@@ -82,6 +81,8 @@ int clean_and_exit(int err_code, t_xe *xe)
ft_putstr_fd("External function error: ", STDERR_FILENO); // -> strerror
ft_putendl_fd(strerror(errno), STDERR_FILENO); // strerror error?
}
else if (err_code == EXIT_NAN)
ft_putstr_fd("exit: bad argument\n", STDERR_FILENO); // -> strerror
ret = (xe->stat_loc);
}
free_str_array(xe->exported); // besoin de free?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment