From: Martin Mares Date: Sun, 5 Apr 2009 16:48:17 +0000 (+0200) Subject: Box: Implemented the `-x' (extra timeout) option X-Git-Tag: python-dummy-working~107 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=5550a53554f5e20cafcde2304ddaeb1f59c43b4f;p=eval.git Box: Implemented the `-x' (extra timeout) option --- diff --git a/box/box.c b/box/box.c index b77ec8d..c93ed0d 100644 --- a/box/box.c +++ b/box/box.c @@ -32,6 +32,7 @@ static int filter_syscalls; /* 0=off, 1=liberal, 2=totalitarian */ static int timeout; /* milliseconds */ static int wall_timeout; +static int extra_timeout; static int pass_environ; static int file_access; static int verbose; @@ -771,7 +772,7 @@ check_timeout(void) ms = (utime + stime) * 1000 / ticks_per_sec; if (verbose > 1) fprintf(stderr, "[time check: %d msec]\n", ms); - if (ms > timeout) + if (ms > timeout && ms > extra_timeout) err("TO: Time limit exceeded"); } } @@ -1074,6 +1075,8 @@ Options:\n\ -T\t\tAllow syscalls for measuring run time\n\ -v\t\tBe verbose (use multiple times for even more verbosity)\n\ -w