From c80b4e513eaa39e3a132b4bb47237e4673314eca Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 27 Aug 2020 15:15:21 +0200 Subject: Fuck this shit --- src/f_exec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/f_exec.c') diff --git a/src/f_exec.c b/src/f_exec.c index 3587700..fccfdea 100644 --- a/src/f_exec.c +++ b/src/f_exec.c @@ -21,7 +21,7 @@ void f_exec(const char fullpath[]) { ft_dprintf(STDERR_FILENO, - "minishell: %s: %s\n", - fullpath, - strerror(errno)); + "minishell: %s: %s\n", + fullpath, + strerror(errno)); } -- cgit v1.2.3 From ca2e36781039eb7e9901ccde395600e7af87ff4f Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 15 Sep 2020 19:59:41 +0200 Subject: Huge fixes and stack stuff --- src/f_exec.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src/f_exec.c') diff --git a/src/f_exec.c b/src/f_exec.c index fccfdea..37cb0f2 100644 --- a/src/f_exec.c +++ b/src/f_exec.c @@ -15,13 +15,23 @@ #include #include +#include "d_define.h" #include "s_struct.h" -void - f_exec(const char fullpath[]) +void f_exec(const char fullpath[], const char bin[]) { - ft_dprintf(STDERR_FILENO, - "minishell: %s: %s\n", - fullpath, - strerror(errno)); + if (fullpath[0] != C_NUL) + { + ft_dprintf(STDERR_FILENO, + "minishell: %s: %s\n", + fullpath, + strerror(errno)); + } + else + { + ft_dprintf(STDERR_FILENO, + "minishell: %s: %s\n", + bin, + strerror(errno)); + } } -- cgit v1.2.3