Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cms/grading/tasktypes/Interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ def evaluate(self, job, file_cacher):
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE,
)
stdout, _ = p.communicate(timeout=self.controller_wall_limit * 2)
try:
stdout, _ = p.communicate(timeout=self.controller_wall_limit * 2)
except subprocess.TimeoutExpired:
p.kill()
stdout, _ = p.communicate()

KEEPER_ERROR_MESSAGE = "Internal error in interactive keeper"

Expand Down
2 changes: 0 additions & 2 deletions cms/grading/tasktypes/interactive_keeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,8 @@ def main():
for i in range(process_limit):
c_to_u_r, c_to_u_w = os.pipe()
u_to_c_r, u_to_c_w = os.pipe()
os.set_inheritable(c_to_u_r, True)
os.set_inheritable(c_to_u_w, True)
os.set_inheritable(u_to_c_r, True)
os.set_inheritable(u_to_c_w, True)
pipes.append({"c_to_u": (c_to_u_r, c_to_u_w), "u_to_c": (u_to_c_r, u_to_c_w)})

controller_sandbox = Sandbox(0, shard, name="controller", temp_dir=temp_dir)
Expand Down
Loading