aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_trap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_sfx_trap.c')
-rw-r--r--src/ft_sfx_trap.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/ft_sfx_trap.c b/src/ft_sfx_trap.c
index dc998da..1499ecf 100644
--- a/src/ft_sfx_trap.c
+++ b/src/ft_sfx_trap.c
@@ -14,7 +14,6 @@
#include <cub3d.h>
#include <unistd.h>
#include <stdint.h>
-#include <sys/wait.h>
static void
ft_sfx_pain(t_cub *cl)
@@ -27,12 +26,7 @@ static void
if (ref % 2)
{
cl->sfx.pain_pid = fork();
- if (cl->sfx.pain_pid < 0)
- {
- ft_printf("Pain fork error\n");
- return ;
- }
- else if (cl->sfx.pain_pid == 0)
+ if (cl->sfx.pain_pid == 0)
{
if (ref % 3)
execve(*(cl->sfx.pain_one + 0), cl->sfx.pain_one, cl->envp);
@@ -46,12 +40,7 @@ void
ft_sfx_trap(t_cub *cl)
{
cl->sfx.trap_pid = fork();
- if (cl->sfx.trap_pid < 0)
- {
- ft_printf("Trap fork error\n");
- return ;
- }
- else if (cl->sfx.trap_pid == 0)
+ if (cl->sfx.trap_pid == 0)
execve(*(cl->sfx.trap + 0), cl->sfx.trap, cl->envp);
else
{