mirror of
https://github.com/engineer-man/piston.git
synced 2025-04-20 20:16:26 +02:00
handle network, run code as different user than compilation
This commit is contained in:
parent
c94c7577fb
commit
7891b676eb
17 changed files with 30 additions and 24 deletions
|
@ -3,4 +3,4 @@ cp code.code interim.java
|
|||
name=$(cat interim.java | grep -Eo 'public\s+class\s+([A-Za-z0-9]+)' | sed -n 's/ */ /gp' | cut -d' ' -f3)
|
||||
mv interim.java $name.java
|
||||
timeout -s KILL 10 javac $name.java
|
||||
timeout -s KILL 3 bash -c "cat args.args | xargs -d '\n' java $name"
|
||||
timeout -s KILL 3 runuser ubuntu -c "cat args.args | xargs -d '\n' java $name"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue