diff options
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); + } +} |