|
2 | 2 | # -*- coding: utf-8 -*- |
3 | 3 |
|
4 | 4 | # Contest Management System - http://cms-dev.github.io/ |
5 | | -# Copyright © 2010-2014 Giovanni Mascellani <mascellani@poisson.phc.unipi.it> |
| 5 | +# Copyright © 2010-2015 Giovanni Mascellani <mascellani@poisson.phc.unipi.it> |
6 | 6 | # Copyright © 2010-2015 Stefano Maggiolo <s.maggiolo@gmail.com> |
7 | 7 | # Copyright © 2010-2012 Matteo Boscariol <boscarim@hotmail.com> |
8 | 8 | # Copyright © 2014 Luca Wehrstedt <luca.wehrstedt@gmail.com> |
@@ -463,6 +463,7 @@ def __init__(self, file_cacher=None, temp_dir=None): |
463 | 463 | # These parameters are not going to be used, but are here for |
464 | 464 | # API compatibility |
465 | 465 | self.box_id = 0 |
| 466 | + self.fsize = None |
466 | 467 | self.cgroup = False |
467 | 468 | self.dirs = [] |
468 | 469 | self.preserve_env = False |
@@ -807,6 +808,7 @@ def __init__(self, file_cacher=None, temp_dir=None): |
807 | 808 | self.preserve_env = False # -e |
808 | 809 | self.inherit_env = [] # -E |
809 | 810 | self.set_env = {} # -E |
| 811 | + self.fsize = None # -f |
810 | 812 | self.stdin_file = None # -i |
811 | 813 | self.stack_space = None # -k |
812 | 814 | self.address_space = None # -m |
@@ -937,6 +939,8 @@ def build_box_options(self): |
937 | 939 | res += ["--env=%s" % var] |
938 | 940 | for var, value in self.set_env.items(): |
939 | 941 | res += ["--env=%s=%s" % (var, value)] |
| 942 | + if self.fsize is not None: |
| 943 | + res += ["--fsize=%d" % self.fsize] |
940 | 944 | if self.stdin_file is not None: |
941 | 945 | res += ["--stdin=%s" % self.inner_absolute_path(self.stdin_file)] |
942 | 946 | if self.stack_space is not None: |
|
0 commit comments