From 3a14b12cc5baabaf6131f526f8d6cabca48a0243 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 20 Jul 2013 12:52:32 -0700 Subject: [PATCH] exit when number of core files changes, not if it's non-zero --- xwords4/linux/scripts/discon_ok2.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xwords4/linux/scripts/discon_ok2.sh b/xwords4/linux/scripts/discon_ok2.sh index b6b22ee2d..3c71932d3 100755 --- a/xwords4/linux/scripts/discon_ok2.sh +++ b/xwords4/linux/scripts/discon_ok2.sh @@ -28,6 +28,7 @@ BOARD_SIZES_OLD=(15) BOARD_SIZES_NEW=(15) NAMES=(UNUSED Brynn Ariela Kati Eric) SEND_CHAT='' +CORE_COUNT=$(ls core.* 2>/dev/null | wc -l) declare -A PIDS declare -A APPS @@ -468,8 +469,8 @@ run_cmds() { [ 0 -ge $COUNT ] && break NOW=$(date '+%s') [ $NOW -ge $ENDTIME ] && break - if ls core.* >/dev/null 2>&1; then - echo "core file found; exiting..." + if [ $CORE_COUNT -ne "$(ls core.* 2>/dev/null | wc -l)" ]; then + echo "number of core files changed; exiting..." killall "$(basename $APP_NEW)" break fi