[torflow/master] Make p global in the sigterm handler

commit 704f1a8f178cc6d780d300beda3fe8a79431e70d Author: teor <teor2345@gmail.com> 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()
participants (1)
-
teor@torproject.org