Rev1845, Hide Tor console window

This commit is contained in:
shortcutme 2017-01-23 00:31:52 +01:00
parent a0c3d7f8a6
commit 2113b03a42
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 4 additions and 2 deletions

View file

@ -10,7 +10,7 @@ class Config(object):
def __init__(self, argv):
self.version = "0.5.1"
self.rev = 1833
self.rev = 1835
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"

View file

@ -78,7 +78,9 @@ class TorManager:
self.log.info("Starting Tor client %s..." % self.tor_exe)
tor_dir = os.path.dirname(self.tor_exe)
self.tor_process = subprocess.Popen(r"%s -f torrc" % self.tor_exe, cwd=tor_dir, close_fds=True)
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
self.tor_process = subprocess.Popen(r"%s -f torrc" % self.tor_exe, cwd=tor_dir, close_fds=True, startupinfo=startupinfo)
for wait in range(1,10): # Wait for startup
time.sleep(wait * 0.5)
self.enabled = True