donate_cpu_lib.py: fixed timeout handling - again (#3158)
This commit is contained in:
parent
4b1d1ebe41
commit
0c6bb44ea5
|
@ -16,7 +16,7 @@ import psutil
|
||||||
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
|
# Version scheme (MAJOR.MINOR.PATCH) should orientate on "Semantic Versioning" https://semver.org/
|
||||||
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
|
# Every change in this script should result in increasing the version number accordingly (exceptions may be cosmetic
|
||||||
# changes)
|
# changes)
|
||||||
CLIENT_VERSION = "1.3.10"
|
CLIENT_VERSION = "1.3.11"
|
||||||
|
|
||||||
# Timeout for analysis with Cppcheck in seconds
|
# Timeout for analysis with Cppcheck in seconds
|
||||||
CPPCHECK_TIMEOUT = 30 * 60
|
CPPCHECK_TIMEOUT = 30 * 60
|
||||||
|
@ -272,9 +272,9 @@ def run_command(cmd):
|
||||||
try:
|
try:
|
||||||
# call with timeout since it might get stuck e.g. gcc-arm-none-eabi
|
# call with timeout since it might get stuck e.g. gcc-arm-none-eabi
|
||||||
comm = p.communicate(timeout=5)
|
comm = p.communicate(timeout=5)
|
||||||
|
p = None
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
pass
|
pass
|
||||||
p = None
|
|
||||||
finally:
|
finally:
|
||||||
if p:
|
if p:
|
||||||
os.killpg(os.getpgid(p.pid), signal.SIGTERM) # Send the signal to all the process groups
|
os.killpg(os.getpgid(p.pid), signal.SIGTERM) # Send the signal to all the process groups
|
||||||
|
|
Loading…
Reference in New Issue