Commit 35cd1d4d authored by Ulysse Beaugnon's avatar Ulysse Beaugnon

Replace .kill() with .terminate() to terminate subprocesses

parent e661f4d5
......@@ -121,7 +121,7 @@ class TunnelManager:
utils.log('Killing the connection with %s...' % (prefix,), 2)
connection = self._connection_dict.pop(prefix)
try:
connection.process.kill()
connection.process.terminate()
except OSError:
# If the process is already exited
pass
......
......@@ -165,22 +165,22 @@ def main():
forwarder.refresh()
except KeyboardInterrupt:
try:
router.kill()
router.terminate()
except:
pass
try:
server_process.kill()
server_process.terminate()
except:
pass
tunnel_manager.killAll()
return 0
except:
try:
router.kill()
router.terminate()
except:
pass
try:
server_process.kill()
server_process.terminate()
except:
pass
try:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment