start tor in tor folder

This commit is contained in:
j 2016-02-01 16:39:54 +05:30
parent 31e05d0b5c
commit de875a6cb4

View file

@ -81,9 +81,10 @@ DirReqStatistics 0
env = None
cmd = [tor, '--defaults-torrc', defaults, '-f', torrc, 'DataDirectory', tor_data]
cmd += self.geoip(tor)
cwd = os.path.dirname(tor)
while self.running:
self.p = subprocess.Popen(cmd, stdout=subprocess.PIPE, bufsize=1,
universal_newlines=True, start_new_session=True, env=env)
universal_newlines=True, start_new_session=True, env=env, cwd=cwd)
for line in self.p.stdout:
self._status.append(line)
logger.debug(line)