fix problem with multiple args
This commit is contained in:
parent
31a90fe3ad
commit
460e393772
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 bash code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 bash code.code"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
timeout -s KILL 10 gcc -o binary -x c code.code
|
timeout -s KILL 10 gcc -o binary -x c code.code
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 ./binary"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
timeout -s KILL 10 g++ -o binary -x c++ code.code
|
timeout -s KILL 10 g++ -o binary -x c++ code.code
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 ./binary"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
timeout -s KILL 10 mcs $(echo code.code | sed 's/\///') -nowarn:0219 -out:binary
|
timeout -s KILL 10 mcs $(echo code.code | sed 's/\///') -nowarn:0219 -out:binary
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 mono binary"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 mono binary"
|
||||||
|
|
|
@ -3,4 +3,4 @@ cp code.code interim.go
|
||||||
file="interim.go"
|
file="interim.go"
|
||||||
GOROOT=/usr/lib/go timeout -s KILL 10 go build $file
|
GOROOT=/usr/lib/go timeout -s KILL 10 go build $file
|
||||||
file=${file%%.*}
|
file=${file%%.*}
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 ./$file"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./$file"
|
||||||
|
|
|
@ -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)
|
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
|
mv interim.java $name.java
|
||||||
timeout -s KILL 10 javac $name.java
|
timeout -s KILL 10 javac $name.java
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 java $name"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 java $name"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
timeout -s KILL 10 nasm -f elf64 -o binary.o code.code
|
timeout -s KILL 10 nasm -f elf64 -o binary.o code.code
|
||||||
timeout -s KILL 10 ld binary.o -o binary
|
timeout -s KILL 10 ld binary.o -o binary
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 ./binary"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 nodejs code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 nodejs code.code"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 php code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 php code.code"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 python2 code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 python2 code.code"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 python3.6 code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 python3.6 code.code"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 Rscript code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 Rscript code.code"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 ruby code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ruby code.code"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
timeout -s KILL 10 rustc -o binary code.code
|
timeout -s KILL 10 rustc -o binary code.code
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 ./binary"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 ./binary"
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
cd /tmp/$2
|
cd /tmp/$2
|
||||||
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs timeout -s KILL 3 swift code.code"
|
runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 swift code.code"
|
||||||
|
|
10
readme.md
10
readme.md
|
@ -30,6 +30,7 @@ lxc-create -t download -n piston -- --dist ubuntu --release bionic --arch amd64
|
||||||
./shell
|
./shell
|
||||||
|
|
||||||
# install all necessary piston dependencies
|
# install all necessary piston dependencies
|
||||||
|
export HOME=/opt
|
||||||
echo 'export PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' >> /root/.bashrc
|
echo 'export PATH=/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin' >> /root/.bashrc
|
||||||
echo 'export PATH=$PATH:/root/.cargo/bin' >> /root/.bashrc
|
echo 'export PATH=$PATH:/root/.cargo/bin' >> /root/.bashrc
|
||||||
sed -i \
|
sed -i \
|
||||||
|
@ -40,14 +41,13 @@ apt-get -y install git tzdata nano \
|
||||||
dpkg-dev build-essential python python3 \
|
dpkg-dev build-essential python python3 \
|
||||||
ruby nodejs golang php7.2 r-base mono-complete \
|
ruby nodejs golang php7.2 r-base mono-complete \
|
||||||
nasm openjdk-8-jdk ubuntu-make bf
|
nasm openjdk-8-jdk ubuntu-make bf
|
||||||
mkdir -p /root/.local/share/umake/swift/swift-lang
|
|
||||||
umake swift
|
umake swift
|
||||||
ln -s /root/.local/share/umake/swift/swift-lang/usr/bin/swift /usr/bin/swift
|
ln -s /opt/.local/share/umake/swift/swift-lang/usr/bin/swift /usr/bin/swift
|
||||||
curl https://sh.rustup.rs -sSf | sh
|
curl https://sh.rustup.rs > rust.sh
|
||||||
ln -s /root/.cargo/bin/rustc /usr/bin/rustc
|
sh rust.sh -y
|
||||||
|
ln -s /opt/.cargo/bin/rustc /usr/bin/rustc
|
||||||
rm -rf /home/ubuntu
|
rm -rf /home/ubuntu
|
||||||
chmod 777 /tmp
|
chmod 777 /tmp
|
||||||
chmod 777 -R /root
|
|
||||||
|
|
||||||
# create runnable users and apply limits
|
# create runnable users and apply limits
|
||||||
for i in {1..150}; do
|
for i in {1..150}; do
|
||||||
|
|
Loading…
Reference in New Issue