[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#9245: FreeBSD make in concurrent mode report spurious success in
From: |
Stefano Lattarini |
Subject: |
Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness |
Date: |
Tue, 16 Aug 2011 18:28:12 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
Hi Eric.
On Tuesday 16 August 2011, Eric Blake wrote:
> On 08/16/2011 10:04 AM, Stefano Lattarini wrote:
> > The "proper fix" is even easier BTW: just use "$$exit || exit 1" instead.
> >
> > The updated patch should now work (and I've tested it properly this time).
> > This new patch hasn't been derived by "cargo-cult guessing", but from the
> > explanation of the relevant FreeBSD make bug provided by Jilles Tjoelker:
> > <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>
> >
> > Now that's something to be documented in the Autoconf manual I'd say ...
>
> Indeed. So it all boils down to BSD make rewriting rules (but only for
> make -j) to be roughly:
>
> sh -c 'set -v; your rules; set +v'
>
> and losing your exit status (not to mention sharing shell status between
> commands that are supposed to be in independent shells), when it really
> should have been rewriting as something more complex:
>
> sh -c '(your rule 1); (your rule 2); st=$?; set +v; exit $st'
>
> And your workaround of an explicit exit rather than relying on $? at the
> end of your 'set +e' invocation is indeed the proper way to force the
> parallel make bug to be avoided, by exiting prior to any post-commands
> injected by the BSD make rewriting going on that corrupt $?.
>
I'll have a "draft patch" read soonish. There is ample room for improvements,
but I'll post it here anyway since it can benefit from early feedback.
Regards,
Stefano
- Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness, Eric Blake, 2011/08/16
- Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness,
Stefano Lattarini <=
- [PATCH] docs: other issues with parallel BSD make (was: Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness), Stefano Lattarini, 2011/08/16
- Re: [PATCH] docs: other issues with parallel BSD make (was: Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness), Bob Friesenhahn, 2011/08/16
- Re: [PATCH] docs: other issues with parallel BSD make (was: Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness), Stefano Lattarini, 2011/08/16
- Re: [PATCH] docs: other issues with parallel BSD make (was: Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness), Bob Friesenhahn, 2011/08/16
- Re: [PATCH] docs: other issues with parallel BSD make (was: Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness), Stefano Lattarini, 2011/08/18
- Re: [PATCH] docs: other issues with parallel BSD make, Eric Blake, 2011/08/18
- Re: [PATCH] docs: other issues with parallel BSD make, Stefano Lattarini, 2011/08/18
- Re: [PATCH] docs: other issues with parallel BSD make (was: Re: bug#9245: FreeBSD make in concurrent mode report spurious success in automake-generated tests harness), Bob Friesenhahn, 2011/08/18