add support for bash

This commit is contained in:
Brian Seymour 2019-06-10 23:55:53 -05:00
parent 389f4ed335
commit 728c263c50
3 changed files with 4 additions and 0 deletions

View File

@ -61,6 +61,7 @@ func Execute(res http.ResponseWriter, req *http.Request) {
"swift", "swift",
"brainfuck", "bf", "brainfuck", "bf",
"rust", "rust",
"bash",
} }
// check if the supplied language is supported // check if the supplied language is supported

2
lxc/executors/bash Normal file
View File

@ -0,0 +1,2 @@
cd /tmp/$2
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 bash code.code"

1
tests/test.sh Normal file
View File

@ -0,0 +1 @@
echo 'good'