Normed stuff

This commit is contained in:
Maieul BOYER 2024-09-04 17:06:41 +00:00
parent 8146ed2176
commit f925aea552
9 changed files with 23 additions and 25 deletions

View file

@ -18,8 +18,18 @@
# define BASE_PATH "/no_base_path_defined/"
#endif
#if defined(PRINT_BACKTRACE) || defined(BACKTRACE_DEEP)
// #if true // TO_REMOVE
#ifdef PRINT_BACKTRACE
# ifndef _PRINT_BACKTRACE
# define _PRINT_BACKTRACE
# endif
#endif
#ifdef BACKTRACE_DEEP
# ifndef _PRINT_BACKTRACE
# define _PRINT_BACKTRACE
# endif
#endif
#ifdef _PRINT_BACKTRACE
# ifndef BACKTRACE_DEEP
# define BACKTRACE_DEEP 256
# endif

View file

@ -15,12 +15,19 @@
# define _GNU_SOURCE
# if defined(PRINT_BACKTRACE) || defined(BACKTRACE_DEEP)
# ifdef PRINT_BACKTRACE
# include <dlfcn.h>
# include <execinfo.h>
# include <link.h>
# include <stdio.h>
# include <stdlib.h>
# endif
# ifdef BACKTRACE_DEEP
# include <dlfcn.h>
# include <execinfo.h>
# include <link.h>
# include <stdio.h>
# include <stdlib.h>
# endif
#endif /* GNU_SOURCE_H */

View file

@ -43,7 +43,7 @@ t_error spawn_process_exec(t_spawn_info info, t_process *process)
close_fd(info.stdout.fd.fd);
close_fd(info.stderr.fd.fd);
vec_str_push(&info.arguments, NULL);
vec_str_push(&info.environement, NULL);
vec_str_push(&info.environement, NULL);
execve(info.binary_path, info.arguments.buffer, info.environement.buffer);
return (ERROR);
}