fix: signal

This commit is contained in:
Camille Chauvet
2023-04-05 15:32:04 +00:00
parent e0fb7f1fd0
commit 5d482fc65a
16 changed files with 68 additions and 97 deletions

View File

@ -6,16 +6,16 @@
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/27 13:42:09 by cchauvet #+# #+# */
/* Updated: 2023/03/27 13:42:58 by cchauvet ### ########.fr */
/* Updated: 2023/04/05 14:48:30 by alouis-j ### ########.fr */
/* */
/* ************************************************************************** */
#include "./data_private.h"
#include "data.h"
t_data *ft_get_data(void)
int *ft_get_exit_code(void)
{
static t_data data;
static int exit_code;
return (&data);
return (&exit_code);
}

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angouleme.fr +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2023/03/27 13:43:39 by cchauvet #+# #+# */
/* Updated: 2023/03/27 13:43:40 by cchauvet ### ########.fr */
/* Updated: 2023/04/05 14:45:23 by alouis-j ### ########.fr */
/* */
/* ************************************************************************** */
@ -18,10 +18,9 @@ typedef struct s_data
{
t_list **env;
t_list **cmds;
int exit_code;
int child_pid;
int *exit_code;
} t_data;
t_data *ft_get_data(void);
int *ft_get_exit_code(void);
#endif