summaryrefslogtreecommitdiff
path: root/shredder.sh
diff options
context:
space:
mode:
Diffstat (limited to 'shredder.sh')
-rw-r--r--shredder.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/shredder.sh b/shredder.sh
index c321183..78ba718 100644
--- a/shredder.sh
+++ b/shredder.sh
@@ -44,7 +44,9 @@ done
while true; do
for child in ${children}; do
- activeChildren="${activeChildren} $(ps T | grep $child | awk '{print $1}')"
+ if kill -0 ${child}; then
+ activeChildren="${activeChildren} ${child}"
+ fi
done
# if no active children, trim the whitespace so we can check for empty string