Fix stdin for most languages

This commit is contained in:
Vrganj 2021-01-17 00:54:57 +00:00
parent b7ba08ccdf
commit 008d55643b
26 changed files with 172 additions and 103 deletions

View file

@ -1,7 +1,6 @@
cd /tmp/$2
#!/bin/bash
if [[ -z $(grep '[^[:space:]]' args.args) ]]; then
runuser runner$1 -c "cd /tmp/$2 ; timeout -s KILL 3 elixir code.code"
else
runuser runner$1 -c "cd /tmp/$2 ; cat args.args ; xargs -d '\n' timeout -s KILL 3 elixir code.code < stdin.stdin"
fi
runuser runner$1 -c "
cd /tmp/$2
timeout -s KILL 3 xargs -a args.args -d '\n' elixir code.code < stdin.stdin
"