aboutsummaryrefslogtreecommitdiff
path: root/clean_philo_three
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2021-01-09 16:07:01 +0100
committerCharles Cabergs <me@cacharle.xyz>2021-01-09 16:07:01 +0100
commit802ea8347d1ceb7a02cf279359b3b101106fab94 (patch)
tree3f8b38056e29d94a813351fb99cc911d89f8df3d /clean_philo_three
parentebbd81e4312d945b359d2761acfeb613da1f98c8 (diff)
downloadphilosophers-802ea8347d1ceb7a02cf279359b3b101106fab94.tar.gz
philosophers-802ea8347d1ceb7a02cf279359b3b101106fab94.tar.bz2
philosophers-802ea8347d1ceb7a02cf279359b3b101106fab94.zip
Added separate thread to check if max meal num is reached independent from philosopher death
Diffstat (limited to 'clean_philo_three')
-rwxr-xr-xclean_philo_three2
1 files changed, 1 insertions, 1 deletions
diff --git a/clean_philo_three b/clean_philo_three
index 64e53bc..7e5c722 100755
--- a/clean_philo_three
+++ b/clean_philo_three
@@ -1,3 +1,3 @@
#!/bin/sh
-ps aux | grep philo_three | tr -s ' ' | cut -d ' ' -f 2 | xargs kill -9
+ps aux | grep philo_three | grep -v grep | tr -s ' ' | cut -d ' ' -f 2 | xargs -L1 kill -9