[Buildroot] [PATCH 00/51] TLP/PPS: intro, package cleanup.

Gustavo Zacarias gustavo.zacarias at free-electrons.com
Fri Oct 28 21:25:10 UTC 2016


On 25/10/16 06:29, Arnout Vandecappelle wrote:

>  I don't think it will, because $$PPID will be the same make process for all
> packages that are built in parallel. So when starting the build of package 1,
> you're redirecting to logfile 1; as soon as package 2 starts to build, the
> output is redirected to logfile 2, so any new process spawned for package 1 will
> also be redirected. It will probably seem to work in many cases, because
> _BUILD_CMDS typically contains only a single call to $(MAKE) and that *probably*
> gets executed before the hook of package 2 is called. But I think you will get
> some occasional weird mixups of different packages.
>
>
>  But I have thought of a possible approach:
>
> export BR_CURRENT_LOGFILE = $(BUILD_DIR)/$($(PKG)_RAWNAME).log
> export SHELL = $(TOPDIR)/support/scripts/shell_logwrapper

Hi Arnout.
I'd use $($(PKG)_NAME).log or you risk the host/target packages writing 
the same log file at the same time, besides a single file being more 
"noisy".

> and in shell_logwrapper:
>
> exec >> $(BR_CURRENT_LOGFILE) 2>&1
> exec /bin/bash "$@"

This generally results in a forkbomb, it should work, but it doesn't :)
Using exec file descriptor copying results in the same forkbomb.
But i've got an alternative, RFC/test patchset incoming.

Regards.


More information about the buildroot mailing list