From 5f71c63b6560e2d8171633ed6502456b16a3f1a9 Mon Sep 17 00:00:00 2001 From: Brian Seymour Date: Fri, 5 Oct 2018 20:39:47 -0500 Subject: [PATCH] update args --- docker/execute | 2 +- docker/executors/c | 2 -- docker/executors/cpp | 2 -- docker/executors/csharp | 2 -- docker/executors/go | 2 -- docker/executors/nasm | 2 -- docker/executors/node | 4 +--- docker/executors/php | 4 +--- docker/executors/python2 | 4 +--- docker/executors/python3 | 4 +--- docker/executors/r | 4 +--- docker/executors/ruby | 4 +--- 12 files changed, 7 insertions(+), 29 deletions(-) diff --git a/docker/execute b/docker/execute index 8cb0451..485b05a 100755 --- a/docker/execute +++ b/docker/execute @@ -75,6 +75,6 @@ docker run \ piston \ runuser \ -l runner \ - -c "/$bin /$file $file ${@:2} 2>&1 | head -c 65536" + -c "bash /$bin /$file $file ${@:3} 2>&1 | head -c 65536" rm -f /tmp/$file diff --git a/docker/executors/c b/docker/executors/c index df5a482..9a9a57f 100755 --- a/docker/executors/c +++ b/docker/executors/c @@ -1,4 +1,2 @@ -#!/bin/sh - 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 4abbca8..8202a77 100755 --- a/docker/executors/cpp +++ b/docker/executors/cpp @@ -1,4 +1,2 @@ -#!/bin/sh - 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 0c86ddd..097d599 100755 --- a/docker/executors/csharp +++ b/docker/executors/csharp @@ -1,5 +1,3 @@ -#!/bin/sh - cp /*.code . 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 028b08e..091135c 100755 --- a/docker/executors/go +++ b/docker/executors/go @@ -1,5 +1,3 @@ -#!/bin/sh - file=$1 timeout -s KILL 10 go build $file diff --git a/docker/executors/nasm b/docker/executors/nasm index 79f48a3..3fa4ac9 100755 --- a/docker/executors/nasm +++ b/docker/executors/nasm @@ -1,5 +1,3 @@ -#!/bin/sh - 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 280c62c..4ffca5d 100755 --- a/docker/executors/node +++ b/docker/executors/node @@ -1,3 +1 @@ -#!/bin/sh - -timeout -s KILL 3 nodejs ${@:2} +timeout -s KILL 3 nodejs $1 ${@:2} diff --git a/docker/executors/php b/docker/executors/php index 0d36f2f..f561779 100755 --- a/docker/executors/php +++ b/docker/executors/php @@ -1,3 +1 @@ -#!/bin/sh - -timeout -s KILL 3 php ${@:2} +timeout -s KILL 3 php $1 ${@:2} diff --git a/docker/executors/python2 b/docker/executors/python2 index 7a9f000..23aef14 100755 --- a/docker/executors/python2 +++ b/docker/executors/python2 @@ -1,3 +1 @@ -#!/bin/sh - -timeout -s KILL 3 python2 ${@:2} +timeout -s KILL 3 python2 $1 ${@:2} diff --git a/docker/executors/python3 b/docker/executors/python3 index 47d5ee4..daa5f7a 100755 --- a/docker/executors/python3 +++ b/docker/executors/python3 @@ -1,3 +1 @@ -#!/bin/sh - -timeout -s KILL 3 python3.6 ${@:2} +timeout -s KILL 3 python3.6 $1 ${@:2} diff --git a/docker/executors/r b/docker/executors/r index dc1a9e5..15e5f99 100755 --- a/docker/executors/r +++ b/docker/executors/r @@ -1,3 +1 @@ -#!/bin/sh - -timeout -s KILL 3 Rscript ${@:2} +timeout -s KILL 3 Rscript $1 ${@:2} diff --git a/docker/executors/ruby b/docker/executors/ruby index 73a6d48..58379e0 100755 --- a/docker/executors/ruby +++ b/docker/executors/ruby @@ -1,3 +1 @@ -#!/bin/sh - -timeout -s KILL 3 ruby ${@:2} +timeout -s KILL 3 ruby $1 ${@:2}