From 6cc2496cd6eb6183872f0bbede7dc3f3af6a2a58 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Fri, 5 Oct 2018 20:26:22 -0500 Subject: [PATCH] args --- docker/execute | 2 +- docker/executors/c | 4 ++-- docker/executors/cpp | 4 ++-- docker/executors/csharp | 4 ++-- docker/executors/go | 4 ++-- docker/executors/nasm | 6 +++--- docker/executors/node | 2 +- docker/executors/php | 2 +- docker/executors/python2 | 2 +- docker/executors/python3 | 2 +- docker/executors/r | 2 +- docker/executors/ruby | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docker/execute b/docker/execute index e44029d..8cb0451 100755 --- a/docker/execute +++ b/docker/execute @@ -75,6 +75,6 @@ docker run \ piston \ runuser \ -l runner \ - -c "/$bin /$file $file 2>&1 | head -c 65536" + -c "/$bin /$file $file ${@:2} 2>&1 | head -c 65536" rm -f /tmp/$file diff --git a/docker/executors/c b/docker/executors/c index 64e1558..df5a482 100755 --- a/docker/executors/c +++ b/docker/executors/c @@ -1,4 +1,4 @@ #!/bin/sh -gcc -o binary -x c $1 -timeout -s KILL 3 ./binary +timeout -s KILL 10 gcc -o binary -x c $1 +timeout -s KILL 3 ./binary ${@:2} diff --git a/docker/executors/cpp b/docker/executors/cpp index 2961023..4abbca8 100755 --- a/docker/executors/cpp +++ b/docker/executors/cpp @@ -1,4 +1,4 @@ #!/bin/sh -g++ -o binary -x c++ $1 -timeout -s KILL 3 ./binary +timeout -s KILL 10 g++ -o binary -x c++ $1 +timeout -s KILL 3 ./binary ${@:2} diff --git a/docker/executors/csharp b/docker/executors/csharp index dd1b77c..0c86ddd 100755 --- a/docker/executors/csharp +++ b/docker/executors/csharp @@ -1,5 +1,5 @@ #!/bin/sh cp /*.code . -mcs $(echo $1 | sed 's/\///') -out:binary -timeout -s KILL 3 mono binary +timeout -s KILL 10 mcs $(echo $1 | sed 's/\///') -out:binary +timeout -s KILL 3 mono binary ${@:2} diff --git a/docker/executors/go b/docker/executors/go index bfc21a0..028b08e 100755 --- a/docker/executors/go +++ b/docker/executors/go @@ -2,8 +2,8 @@ file=$1 -go build $file +timeout -s KILL 10 go build $file file=${file%%.*} -timeout -s KILL 3 ./$file +timeout -s KILL 3 ./$file ${@:2} diff --git a/docker/executors/nasm b/docker/executors/nasm index b4d781e..79f48a3 100755 --- a/docker/executors/nasm +++ b/docker/executors/nasm @@ -1,5 +1,5 @@ #!/bin/sh -nasm -f elf64 -o binary.o $1 -ld binary.o -o binary -timeout -s KILL 3 ./binary +timeout -s KILL 10 nasm -f elf64 -o binary.o $1 +timeout -s KILL 10 ld binary.o -o binary +timeout -s KILL 3 ./binary ${@:2} diff --git a/docker/executors/node b/docker/executors/node index d27663a..280c62c 100755 --- a/docker/executors/node +++ b/docker/executors/node @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 3 nodejs $* +timeout -s KILL 3 nodejs ${@:2} diff --git a/docker/executors/php b/docker/executors/php index 8279379..0d36f2f 100755 --- a/docker/executors/php +++ b/docker/executors/php @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 3 php $* +timeout -s KILL 3 php ${@:2} diff --git a/docker/executors/python2 b/docker/executors/python2 index 8d2076c..7a9f000 100755 --- a/docker/executors/python2 +++ b/docker/executors/python2 @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 3 python2 $* +timeout -s KILL 3 python2 ${@:2} diff --git a/docker/executors/python3 b/docker/executors/python3 index 021286a..47d5ee4 100755 --- a/docker/executors/python3 +++ b/docker/executors/python3 @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 3 python3.6 $* +timeout -s KILL 3 python3.6 ${@:2} diff --git a/docker/executors/r b/docker/executors/r index fb7f288..dc1a9e5 100755 --- a/docker/executors/r +++ b/docker/executors/r @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 3 Rscript $* +timeout -s KILL 3 Rscript ${@:2} diff --git a/docker/executors/ruby b/docker/executors/ruby index 3c006db..73a6d48 100755 --- a/docker/executors/ruby +++ b/docker/executors/ruby @@ -1,3 +1,3 @@ #!/bin/sh -timeout -s KILL 3 ruby $* +timeout -s KILL 3 ruby ${@:2}