From 473cf5d7576744b679b7a504232b5ebd4b5d689f Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 5 Oct 2020 15:06:03 +0200 Subject: Norming --- philo_three/src/child.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'philo_three/src/child.c') diff --git a/philo_three/src/child.c b/philo_three/src/child.c index 5bc0129..2e9b566 100644 --- a/philo_three/src/child.c +++ b/philo_three/src/child.c @@ -6,7 +6,7 @@ /* By: cacharle +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2020/09/30 14:36:16 by cacharle #+# #+# */ -/* Updated: 2020/10/01 09:11:29 by cacharle ### ########.fr */ +/* Updated: 2020/10/05 15:02:10 by cacharle ### ########.fr */ /* */ /* ************************************************************************** */ @@ -25,11 +25,10 @@ void *routine_death(t_philo *philo) pid_t child_start(t_philo *philo) { - pid_t pid; pthread_t thread_death; + pid_t pid; - pid = fork(); - if (pid == -1) + if ((pid = fork()) == -1) return (-1); if (pid == 0) { @@ -50,5 +49,5 @@ pid_t child_start(t_philo *philo) } exit(0); } - return pid; + return (pid); } -- cgit