summaryrefslogtreecommitdiffstats
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
parent1502051f4ac6929fb3d85027b368923134c767ff (diff)
downloadhellijudge-legacy.git-9f43cfbf63b83cf02da8647c50a4c6dc523de5ad.zip
hellijudge-legacy.git-9f43cfbf63b83cf02da8647c50a4c6dc523de5ad.tar.gz
hellijudge-legacy.git-9f43cfbf63b83cf02da8647c50a4c6dc523de5ad.tar.xz
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
-rw-r--r--TODO5
-rwxr-xr-xbase/jail.sh4
2 files changed, 7 insertions, 2 deletions
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..879ae3b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,5 @@
+ - redirect stderr of $OUT to /dev/null
+ - maxtime maxmem badstat mark FINISH
+ - localmode (disable mysql communication for localhost testing)
+ - unknown problem with scanf.
+ - list requirements. MySQL-python
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