async-io's test killer added by mario-goulart on Mon Sep 4 09:22:30 2017

#! /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