File tree Expand file tree Collapse file tree 12 files changed +44
-23
lines changed
Expand file tree Collapse file tree 12 files changed +44
-23
lines changed Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' bash code.code < stdin.stdin
3+ timeoutInSec=` cat timeout.timeout`
4+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' bash code.code < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3+ timeoutInSec=` cat timeout.timeout`
34cp code.code code.c
4- timeout -s SIGKILL 10 g++ code.c -o a.out
5+ timeout -s SIGKILL 5 g++ code.c -o a.out
56chmod +x a.out
6- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' ./a.out < stdin.stdin
7+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' ./a.out < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3+ timeoutInSec=` cat timeout.timeout`
34cp code.code code.c
4- timeout -s SIGKILL 10 gcc code.c -o a.out
5+ timeout -s SIGKILL 5 gcc code.c -o a.out
56chmod +x a.out
6- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' ./a.out < stdin.stdin
7+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' ./a.out < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3+ timeoutInSec=` cat timeout.timeout`
34cp code.code code.go
4- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' go run code.go < stdin.stdin
5+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' go run code.go < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3+ timeoutInSec=` cat timeout.timeout`
34cp code.code interim.java
4- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' java interim.java < stdin.stdin
5+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' java interim.java < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' node code.code < stdin.stdin
3+ timeoutInSec=` cat timeout.timeout`
4+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' node code.code < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' python2 code.code < stdin.stdin
3+ timeoutInSec=` cat timeout.timeout`
4+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' python2 code.code < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' python3 code.code < stdin.stdin
3+ timeoutInSec=` cat timeout.timeout`
4+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' python3 code.code < stdin.stdin
Original file line number Diff line number Diff line change 11#! /bin/sh
22cd $1
3- timeout -s SIGKILL 10 xargs -a args.args -d ' \n' ruby code.code < stdin.stdin
3+ timeoutInSec=` cat timeout.timeout`
4+ timeout -s SIGKILL $timeoutInSec xargs -a args.args -d ' \n' ruby code.code < stdin.stdin
Original file line number Diff line number Diff line change @@ -21,3 +21,5 @@ export enum Environment {
2121export interface IExecuteOptions {
2222 timeout ?: number ;
2323}
24+
25+ export const defaultExecutionTimeout = 5 ;
You can’t perform that action at this time.
0 commit comments