diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-05 15:06:03 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-05 15:06:03 +0200 |
| commit | 473cf5d7576744b679b7a504232b5ebd4b5d689f (patch) | |
| tree | 6518e4fd26bf4584e5a2d72b9e1289473bce76da /philo_three/src/child.c | |
| parent | a237321ee53f44793ebc8b9db26b743f092b5e40 (diff) | |
| download | philosophers-473cf5d7576744b679b7a504232b5ebd4b5d689f.tar.gz philosophers-473cf5d7576744b679b7a504232b5ebd4b5d689f.tar.bz2 philosophers-473cf5d7576744b679b7a504232b5ebd4b5d689f.zip | |
Norming
Diffstat (limited to 'philo_three/src/child.c')
| -rw-r--r-- | philo_three/src/child.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 <me@cacharle.xyz> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* 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); } |
