update piston

This commit is contained in:
Brian Seymour 2018-12-08 11:06:01 -06:00
parent 16f4c03a80
commit 27f4443719
3 changed files with 6 additions and 0 deletions

View File

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

View File

@ -81,6 +81,9 @@ case "$lang" in
"swift")
bin=swift
;;
"brainfuck" | "bf")
bin=brainfuck
;;
*)
echo "invalid language"
exit

2
lxc/executors/brainfuck Executable 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 bf code.code"