Skip to content

Commit

Permalink
set ld path
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Oct 29, 2022
1 parent 60f30f0 commit 5df2c91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cashu/tor/tor.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,14 @@ def run_daemon(self):
cmd = [f"{self.tor_path()}", "--defaults-torrc", f"{self.tor_config_path()}"]
if self.keep_alive and platform.system() != "Windows":
cmd = ["timeout", f"{self.keep_alive}"] + cmd
env = dict(os.environ)
if platform.system() == "Linux":
env["LD_LIBRARY_PATH"] = os.path.dirname(self.tor_path())
elif platform.system() == "Darwin":
env["DYLD_LIBRARY_PATH"] = os.path.dirname(self.tor_path())
self.tor_proc = subprocess.Popen(
cmd,
cwd=os.path.dirname(self.tor_path()),
env=env,
shell=False,
close_fds=True,
stdout=subprocess.PIPE,
Expand Down

0 comments on commit 5df2c91

Please sign in to comment.