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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ft_sfx_trap.c b/src/ft_sfx_trap.c
index 1499ecf..b52b9c1 100644
--- a/src/ft_sfx_trap.c
+++ b/src/ft_sfx_trap.c
@@ -15,6 +15,7 @@
#include <unistd.h>
#include <stdint.h>
+#include <pthread.h>
static void
ft_sfx_pain(t_cub *cl)
{
@@ -40,7 +41,7 @@ void
ft_sfx_trap(t_cub *cl)
{
cl->sfx.trap_pid = fork();
- if (cl->sfx.trap_pid == 0)
+ else if (cl->sfx.trap_pid == 0)
execve(*(cl->sfx.trap + 0), cl->sfx.trap, cl->envp);
else
{