INNER CODE UNIT · Python
_kill
jd/pifpaf · pifpaf/drivers/__init__.py:95
def _kill(self, parent):
log_thread = getattr(parent, "_log_thread", None)
util.process_cleaner(parent)
if log_thread:
# Parent process have been killed
log_thread.join(timeout=3)
if log_thread.is_alive():
LOG.warning("logging thread for `%s` is still alive", parent)
@staticmethod
def find_executable(filename, extra_paths):
paths = extra_paths + os.getenv('PATH', os.defpath).split(os.pathsep)
for path in paths:
loc = shutil.which(filename, path=path)
if loc is not None:
return loc