Skip to content

Commit

Permalink
Merge pull request #783 from UCL-INGI/run_student_wait_fix
Browse files Browse the repository at this point in the history
[containers/run_student] Keep std file descriptors open in wait_until_finished
  • Loading branch information
Drumor committed Feb 18, 2022
2 parents 7a8002a + 59289a0 commit d1b86b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions base-containers/base/inginious_container_api/run_student.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def wait_until_finished(both_dockers, zmq_socket, stdin, stdout, stderr, student
# handle the student_container outputs and wait for final message
message = None
msg_type = None
stdout_file = os.fdopen(stdout, 'wb')
stderr_file = os.fdopen(stderr, 'wb')
stdout_file = os.fdopen(stdout, 'wb', closefd=False)
stderr_file = os.fdopen(stderr, 'wb', closefd=False)

while msg_type != "run_student_retval":
zmq_socket.send(msgpack.dumps({"type": "dummy_message"}, use_bin_type=True)) # ping pong socket
Expand Down

0 comments on commit d1b86b4

Please sign in to comment.