diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-13 05:39:06 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-03-13 05:39:06 +0100 |
commit | a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6 (patch) | |
tree | 6fc0f9c1701cd729d65ca110c3c9a089c321a694 /src/ft_sfx_death.c | |
parent | I fucking love it (diff) | |
download | 42-cub3d-a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6.tar.gz 42-cub3d-a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6.tar.bz2 42-cub3d-a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6.tar.xz 42-cub3d-a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6.tar.zst 42-cub3d-a2ed84f6da6b5ca2226e2bbc5cc65e142810d8c6.zip |
New sfx, clean exit
Diffstat (limited to '')
-rw-r--r-- | src/ft_sfx_death.c | 24 |
1 files changed, 24 insertions, 0 deletions
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 <marvin@42.fr> +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2020/02/24 17:17:54 by rbousset #+# #+# */ +/* Updated: 2020/02/24 17:17:56 by rbousset ### ########lyon.fr */ +/* */ +/* ************************************************************************** */ + +#include <cub3d.h> +#include <unistd.h> + +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); + } +} |