Skip to content

Commit

Permalink
Merge pull request OpenInterpreter#476 from coderfengyun/main
Browse files Browse the repository at this point in the history
MOD: close subprocess and its file handles when reset
  • Loading branch information
KillianLucas authored Nov 15, 2023
2 parents 3f0dbdb + e0eeaba commit d3c6da9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions interpreter/code_interpreters/subprocess_code_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ def preprocess_code(self, code):

def terminate(self):
self.process.terminate()
self.proc.stdin.close()
self.proc.stdout.close()

def start_process(self):
if self.process:
Expand Down

0 comments on commit d3c6da9

Please sign in to comment.