[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [ooni-probe/master] Terminate the tor process cleanly after we have run a test.
commit d34931290c0ed0887ad77f83a4cb77926a47e998
Author: Arturo Filastò <art@xxxxxxxxx>
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits