mirror of
https://github.com/engineer-man/piston.git
synced 2025-07-22 21:48:45 +02:00
new docs, better executors, better expansion for languages
This commit is contained in:
parent
7bc9b5b63a
commit
3233db5c1f
24 changed files with 131 additions and 59 deletions
16
lxc/execute
16
lxc/execute
|
@ -66,9 +66,6 @@ case "$lang" in
|
|||
"c#" | "csharp" | "cs")
|
||||
bin=csharp
|
||||
;;
|
||||
"r")
|
||||
bin=r
|
||||
;;
|
||||
"php")
|
||||
bin=php
|
||||
;;
|
||||
|
@ -81,9 +78,6 @@ case "$lang" in
|
|||
"swift")
|
||||
bin=swift
|
||||
;;
|
||||
"brainfuck" | "bf")
|
||||
bin=brainfuck
|
||||
;;
|
||||
"rust")
|
||||
bin=rust
|
||||
;;
|
||||
|
@ -100,14 +94,12 @@ esac
|
|||
|
||||
# runner
|
||||
timeout -s KILL 10 \
|
||||
lxc-attach -n piston -- \
|
||||
/bin/bash -c "\
|
||||
PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin \
|
||||
bash /exec/$bin $newinc $epoch 2>&1 | head -c 65536"
|
||||
lxc-attach --clear-env -n piston -- \
|
||||
/bin/bash -l -c "bash /exec/$bin $newinc $epoch 2>&1 | head -c 65536"
|
||||
|
||||
# process janitor
|
||||
lxc-attach -n piston -- \
|
||||
/bin/bash -c "\
|
||||
lxc-attach --clear-env -n piston -- \
|
||||
/bin/bash -l -c "\
|
||||
for i in {1..100}; do pkill -u runner$newinc --signal SIGKILL; done ;\
|
||||
find /tmp -user runner$newinc -exec /bin/rm -rf {} \;\
|
||||
" > /dev/null 2>&1 &
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue