From c5f54ee19c5c5f35fa073564d7790816f56b1057 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 15 Aug 2020 18:25:16 +0200 Subject: Quick fix --- src/e_externs.c | 2 +- src/f_com.c | 3 ++- src/f_com.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/e_externs.c b/src/e_externs.c index 554b3d1..46afb28 100644 --- a/src/e_externs.c +++ b/src/e_externs.c @@ -92,7 +92,7 @@ void ft_delwords(envpath); if (fullpath == NULL) { - f_fail_command_not_found(ptr->bin); + f_fail_command_not_found(ptr->bin, msh); } else { diff --git a/src/f_com.c b/src/f_com.c index 5ca03eb..7285205 100644 --- a/src/f_com.c +++ b/src/f_com.c @@ -17,8 +17,9 @@ #include "s_struct.h" void - f_fail_command_not_found(const char command[]) + f_fail_command_not_found(const char command[], t_msh *msh) { ft_dprintf(STDERR_FILENO, "%s: %s: %s\n", "minishell", command, FT_FAIL_COMMAND_NOT_FOUND); + msh->ret = 127; } diff --git a/src/f_com.h b/src/f_com.h index 12023f6..d7c46e1 100644 --- a/src/f_com.h +++ b/src/f_com.h @@ -15,6 +15,6 @@ #include "s_struct.h" -void f_fail_command_not_found(const char command[]); +void f_fail_command_not_found(const char command[], t_msh *msh); #endif -- cgit v1.2.3