mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-31 02:00:45 +00:00
connection: Un-hardcode _KILL_TIMEOUT
Replace erroneous use of _KILL_TIMEOUT constant by the kill_timeout parameter.
This commit is contained in:
parent
6cabad14d0
commit
4e44863777
@ -221,7 +221,7 @@ class PopenBackgroundCommand(BackgroundCommand):
|
|||||||
popen = self.popen
|
popen = self.popen
|
||||||
os.killpg(os.getpgid(popen.pid), signal.SIGTERM)
|
os.killpg(os.getpgid(popen.pid), signal.SIGTERM)
|
||||||
try:
|
try:
|
||||||
popen.wait(timeout=_KILL_TIMEOUT)
|
popen.wait(timeout=kill_timeout)
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
os.killpg(os.getpgid(popen.pid), signal.SIGKILL)
|
os.killpg(os.getpgid(popen.pid), signal.SIGKILL)
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ class AdbBackgroundCommand(BackgroundCommand):
|
|||||||
def _cancel(self, kill_timeout):
|
def _cancel(self, kill_timeout):
|
||||||
self.send_signal(signal.SIGTERM)
|
self.send_signal(signal.SIGTERM)
|
||||||
try:
|
try:
|
||||||
self.adb_popen.wait(timeout=_KILL_TIMEOUT)
|
self.adb_popen.wait(timeout=kill_timeout)
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
self.send_signal(signal.SIGKILL)
|
self.send_signal(signal.SIGKILL)
|
||||||
self.adb_popen.kill()
|
self.adb_popen.kill()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user