[Buildroot] [PATCH v4 9/9] autobuild-run: extend TODO list
thomas.petazzoni at free-electrons.com
Fri Dec 5 08:15:30 UTC 2014
Dear Thomas De Schampheleire,
On Thu, 4 Dec 2014 21:41:24 +0100, Thomas De Schampheleire wrote:
> > Thanks for this investigation. It would indeed be really nice to be
> > able to kill just autobuild-run, and be sure that it stops all
> > underlying builds. We could also catch the signal in autobuild-run, and
> > kill the build jobs, if we are able to record the necessary information
> > about them.
> Brief update: the piece of the puzzle that is causing a new process
> group to be spawned is the 'timeout' command. Everything started under
> the timeout command runs in its own process group, different than the
> one of the python process. Therefore, killing the python process group
> does not kill the timeout+make command.
> The solution is to use subprocess.Popen instead of subprocess.call so
> we can obtain the pid of the timeout call, and change the signal
> handler to explicitly kill this second process group too.
> I still have to make the changes in autobuild-run (currently worked on
> a simple test program), and will submit patches when ready...
Ok, great. Another approach maybe would be to not use timeout, and
instead make the Python script itself monitor the duration of the build
it starts, and kill them if they took too long.
Thanks again for the investigation!
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
More information about the buildroot