mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-10 22:58:45 +02:00
34 lines
1.1 KiB
C
34 lines
1.1 KiB
C
/* ************************************************************************** */
|
|
/* */
|
|
/* ::: :::::::: */
|
|
/* sigpipe.c :+: :+: :+: */
|
|
/* +:+ +:+ +:+ */
|
|
/* By: mmoussou <mmoussou@student.42angouleme.fr +#+ +:+ +#+ */
|
|
/* +#+#+#+#+#+ +#+ */
|
|
/* Created: 2024/08/13 18:23:24 by mmoussou #+# #+# */
|
|
/* Updated: 2024/08/13 18:40:19 by mmoussou ### ########.fr */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
|
|
#include "minishell.h"
|
|
#include "builtins.h"
|
|
|
|
char **get_env_arr(char **env)
|
|
{
|
|
static char **ret;
|
|
|
|
if (env)
|
|
ret = env;
|
|
return (ret);
|
|
}
|
|
|
|
void sig_p(int code)
|
|
{
|
|
t_env **env;
|
|
|
|
(void) code;
|
|
env = get_env(NULL);
|
|
free_exit(*env, get_env_arr(NULL));
|
|
exit(141);
|
|
}
|