aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_sfx_trap.c
blob: 4b3dcf99d0e830200bb6e2af6bac08fbe940335e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* ************************************************************************** */
/*                                                                            */
/*                                                        :::      ::::::::   */
/*   ft_sfx_trap.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>
#include <stdint.h>

void
	ft_sfx_trap(t_cub *cl)
{
	cl->sfx.trap_pid = fork();
	if (cl->sfx.trap_pid == 0)
		execve(*(cl->sfx.trap + 0), cl->sfx.trap, cl->envp);
}