[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torflow/master] Make p global in the sigterm handler
commit 704f1a8f178cc6d780d300beda3fe8a79431e70d
Author: teor <teor2345@xxxxxxxxx>
Date: Fri Nov 10 20:00:48 2017 +1100
Make p global in the sigterm handler
The previous code worked on some python versions, but not on others.
Fixes #24216.
---
NetworkScanners/BwAuthority/bwauthority.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/NetworkScanners/BwAuthority/bwauthority.py b/NetworkScanners/BwAuthority/bwauthority.py
index 89c0d34..e23c8d8 100755
--- a/NetworkScanners/BwAuthority/bwauthority.py
+++ b/NetworkScanners/BwAuthority/bwauthority.py
@@ -58,6 +58,7 @@ def main(argv):
plog('WARN', 'Child process returned %s' % p.returncode)
def sigterm_handler(signum, frame):
+ global p
if p:
p.kill()
exit()
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits