[tor-commits] [ooni-probe/master] Terminate the tor process cleanly after we have run a test.
art at torproject.org
art at torproject.org
Mon Mar 24 15:02:47 UTC 2014
commit d34931290c0ed0887ad77f83a4cb77926a47e998
Author: Arturo Filastò <art at fuffa.org>
Date: Tue Mar 11 18:11:02 2014 +0100
Terminate the tor process cleanly after we have run a test.
---
ooni/nettests/blocking/bridge_reachability.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ooni/nettests/blocking/bridge_reachability.py b/ooni/nettests/blocking/bridge_reachability.py
index 393c02d..892ed02 100644
--- a/ooni/nettests/blocking/bridge_reachability.py
+++ b/ooni/nettests/blocking/bridge_reachability.py
@@ -5,7 +5,7 @@ import subprocess
from distutils.spawn import find_executable
from twisted.python import usage
-from twisted.internet import defer, reactor
+from twisted.internet import defer, reactor, error
import txtorcon
@@ -135,6 +135,10 @@ class BridgeReachability(nettest.NetTestCase):
progress_updates=updates)
@d.addCallback
def setup_complete(proto):
+ try:
+ proto.transport.signalProcess('TERM')
+ except error.ProcessExitedAlready:
+ proto.transport.loseConnection()
log.msg("Successfully connected to %s" % self.bridge)
self.report['success'] = True
More information about the tor-commits
mailing list