Skip to content

Commit

Permalink
Merge pull request #2292 from alejoe91/shell-script
Browse files Browse the repository at this point in the history
Close ShellScript process at deletion
  • Loading branch information
alejoe91 authored Dec 6, 2023
2 parents 170eefb + 452a722 commit 8e32955
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 8e32955

Please sign in to comment.