Skip to content

Commit

Permalink
Close ShellScript process at deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Dec 5, 2023
1 parent 682d727 commit 452a722
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/spikeinterface/sorters/basesorter.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,6 @@ def check_compiled(cls):
"""
shell_script = ShellScript(shell_cmd)
shell_script.start()
shell_script.wait()
retcode = shell_script.wait()
if retcode != 0:
return False
Expand Down
2 changes: 2 additions & 0 deletions src/spikeinterface/sorters/utils/shellscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def cleanup(self) -> None:
return
for dirpath in self._dirs_to_remove:
_rmdir_with_retries(str(dirpath), num_retries=5)
if self._process is not None:
self._process.kill()

def stop(self) -> None:
if not self.isRunning():
Expand Down

0 comments on commit 452a722

Please sign in to comment.