#!/bin/bash

BIN=$1
OUTDIR=$2
TIMEOUT=$3
INDIR=$4

cp -r $INDIR/dir ./

{ timeout -k 9 ${TIMEOUT}s $BIN -rf dir; } &>$OUTDIR/o9

echo "$?" >>$OUTDIR/o9
test -d dir
echo "$?" >>$OUTDIR/o9
test -f dir/file
echo "$?" >>$OUTDIR/o9
