diff --git a/src/spikeinterface/sorters/basesorter.py b/src/spikeinterface/sorters/basesorter.py index 8116587044..c7e3173761 100644 --- a/src/spikeinterface/sorters/basesorter.py +++ b/src/spikeinterface/sorters/basesorter.py @@ -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 diff --git a/src/spikeinterface/sorters/utils/shellscript.py b/src/spikeinterface/sorters/utils/shellscript.py index 18a055cafb..2f267e8057 100644 --- a/src/spikeinterface/sorters/utils/shellscript.py +++ b/src/spikeinterface/sorters/utils/shellscript.py @@ -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():