diff --git a/Interlace/lib/threader.py b/Interlace/lib/threader.py index 8ba4796..3ab1d2d 100644 --- a/Interlace/lib/threader.py +++ b/Interlace/lib/threader.py @@ -1,9 +1,15 @@ import subprocess +import os from concurrent.futures import ThreadPoolExecutor from multiprocessing import Event - from tqdm import tqdm +import platform + +if platform.system().lower() == 'linux': + shell = os.getenv("SHELL") if os.getenv("SHELL") else "/bin/sh" +else: + shell = None class Task(object): def __init__(self, command): @@ -49,7 +55,8 @@ def get_lock(self): def _run_task(self, t=False): s = subprocess.Popen(self.task, shell=True, stdout=subprocess.PIPE, - encoding="utf-8") + encoding="utf-8", + executable=shell) out, _ = s.communicate() if out != "":