From a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 13 Mar 2020 05:39:06 +0100 Subject: New sfx, clean exit --- src/ft_sfx_death.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/ft_sfx_death.c (limited to 'src/ft_sfx_death.c') diff --git a/src/ft_sfx_death.c b/src/ft_sfx_death.c new file mode 100644 index 0000000..e093cf3 --- /dev/null +++ b/src/ft_sfx_death.c @@ -0,0 +1,24 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_sfx_death.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: rbousset +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/24 17:17:54 by rbousset #+# #+# */ +/* Updated: 2020/02/24 17:17:56 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include +#include + +void + ft_sfx_death(t_cub *cl) +{ + cl->death_pid = fork(); + if (cl->death_pid == 0) + { + execve(*(cl->sfx.death + 0), cl->sfx.death, cl->envp); + } +} -- cgit v1.2.3