~ salmonella-environment-setup (master) /scripts/linux/hunt-async-io-tests.sh
Trap1#! /bin/sh
2
3pid=`ps aux | grep '[s]almonella-run-publish/chicken/bin/csi -script run.scm' | grep -v dev/null | awk '{print $2}'`
4
5if [ -n "$pid" ]; then
6 if readlink /proc/$pid/cwd | grep async-io/tests; then
7 test_start=`stat -c "%Y" /proc/$pid`
8 now=`date +%s`
9 if [ `expr $now - $test_start` -gt 300 ]; then
10 kill $pid >/dev/null 2>&1
11 fi
12 fi
13fi