|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We discovered a case where a user of distbuild began a build of
'qtbase', then cancelled it 2 minutes in. The `morph worker-build`
process didn't exit for over an hour -- it ran right through until the
chunk artifacts had been created. Then it exited with code -9 (SIGKILL).
This seems to be due to the fact that SIGKILL doesn't kill subprocesses,
and so any file descriptors the subprocesses have open will remain open.
If we set up the `morph worker-build` process as a process group
leader, using os.setpgid(), then we can use os.killpg() to kill the
entire process group. This should ensure that the `morph worker-build`
command exits straight away, as all of its subprocesses will be killed
at the same time it is.
Change-Id: I38707d18004d8c5bc994fd0cb99e90fd5def58e4
|