summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorroot <root@andjedan.(none)>2011-08-10 12:30:00 -0700
committerroot <root@andjedan.(none)>2011-08-10 12:30:00 -0700
commit9f43cfbf63b83cf02da8647c50a4c6dc523de5ad (patch)
treea7ea01aef9b9b26a8dae559873cf4a7a2c5c1ccf /base
parent1502051f4ac6929fb3d85027b368923134c767ff (diff)
downloadhellijudge-legacy.git-9f43cfbf63b83cf02da8647c50a4c6dc523de5ad.tar.gz
hellijudge-legacy.git-9f43cfbf63b83cf02da8647c50a4c6dc523de5ad.tar.xz
hellijudge-legacy.git-9f43cfbf63b83cf02da8647c50a4c6dc523de5ad.zip
Specify timeout signal
If no signal is specified for timeout, timeout sends the TERM signal upon timeout. The TERM signal wastes about 2 seconds till termination (why?). Since KILL signal terminates the process immediately, we decided to specify the signal. bug found at submission number 723 @ HelliCode
Diffstat (limited to 'base')
-rwxr-xr-xbase/jail.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/jail.sh b/base/jail.sh
index b8ac5e8..1e92fa5 100755
--- a/base/jail.sh
+++ b/base/jail.sh
@@ -32,10 +32,10 @@ FIFORUN="/tmp/fiforun$$"
exec <$FIFORUN >&${COPROC[1]} \
$TIME -f "result $TIME_FORMAT" \
- $TIMEOUT $TIME_LIMIT \
+ $TIMEOUT --signal=SIGKILL $TIME_LIMIT \
$SU $RUN_USER \
$SU_SYNTAX $OUT
-# $SU_SYNTAX "$OUT 2>/dev/null"
+# $SU_SYNTAX "$OUT 2>/dev/null" # FIXME
} 2>&1
rm -f $FIFORUN