giulio98 commited on
Commit
ac04d3c
·
1 Parent(s): 568a1e7

Update execute.py

Browse files
Files changed (1) hide show
  1. execute.py +2 -8
execute.py CHANGED
@@ -36,14 +36,8 @@ def check_correctness(check_program, output, timeout, task_id, completion_id):
36
  :param completion_id: an optional completion ID so we can match
37
  the results later even if execution finishes asynchronously.
38
  """
39
- manager = multiprocessing.Manager()
40
- result = manager.list()
41
-
42
- p = multiprocessing.Process(target=unsafe_execute, args=(check_program, output, result, timeout))
43
- p.start()
44
- p.join(timeout=timeout + 1)
45
- if p.is_alive():
46
- p.kill()
47
 
48
  if not result:
49
  result.append("timed out")
 
36
  :param completion_id: an optional completion ID so we can match
37
  the results later even if execution finishes asynchronously.
38
  """
39
+ result = []
40
+ unsafe_execute(check_program, output, result, timeout)
 
 
 
 
 
 
41
 
42
  if not result:
43
  result.append("timed out")