If I run 'make'
command in subprocess.Popen
it doesn't terminate after timeout
with subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as process:
try:
stdout, stderr = process.communicate(input, timeout=timeout)
except subprocess.TimeoutExpired:
process.kill()
stdout, stderr = process.communicate()
I tried will
subprocess.check_output and subprocess.run
and they also don't work.
If a run each command from Makefile independently using the method above, it works fine.