Skip to content

Commit

Permalink
avoid watchdog getting fooled by binary junk in logfile
Browse files Browse the repository at this point in the history
If grep thinks the file is binary it only prints "Binary file ... matches"
  • Loading branch information
andreas-schwab committed Aug 7, 2014
1 parent 690af79 commit 118b576
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-vm
Expand Up @@ -341,7 +341,7 @@ background_watchdog() {
WATCHDOG_START=
WATCHDOG_TIMEOUT=300
while sleep 5 ; do
WATCH=`grep "### WATCHDOG MARKER" "$LOGFILE" | tail -n 1`
WATCH=`grep -a "### WATCHDOG MARKER" "$LOGFILE" | tail -n 1`
case $WATCH in
*WATCHDOG\ MARKER\ START*) test -n "$WATCHDOG_START" || WATCHDOG_START=`date +%s` ;;
*WATCHDOG\ MARKER\ END*) WATCHDOG_START= ;;
Expand Down

0 comments on commit 118b576

Please sign in to comment.