#! /bin/sh pid=`ps aux | grep '[s]almonella-run-publish/chicken/bin/csi -script run.scm' | grep -v dev/null | awk '{print $2}'` if [ -n "$pid" ]; then if readlink /proc/$pid/cwd | grep async-io/tests; then test_start=`stat -c "%Y" /proc/$pid` now=`date +%s` if [ `expr $now - $test_start` -gt 300 ]; then kill $pid >/dev/null 2>&1 fi fi fi