Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: Mike Gilbert <floppym@g.o>
Cc: gentoo-python@l.g.o, python@g.o
Subject: Re: [gentoo-python] Re: [PATCH 5/5] Re-enable split logs, now in python*_foreach_impl().
Date: Sun, 24 Feb 2013 10:03:52
Message-Id: 20130224110357.517c71ed@pomiocik.lan
In Reply to: [gentoo-python] Re: [PATCH 5/5] Re-enable split logs, now in python*_foreach_impl(). by Mike Gilbert
1 On Sat, 23 Feb 2013 20:42:10 -0500
2 Mike Gilbert <floppym@g.o> wrote:
3
4 > On 02/21/2013 05:10 PM, Michał Górny wrote:
5 > > [[ ${ret} -eq 0 && ${lret} -ne 0 ]] && ret=${lret}
6 > > @@ -655,7 +664,8 @@ python_parallel_foreach_impl() {
7 > > _python_parallel() {
8 > > (
9 > > multijob_child_init
10 > > - "${@}"
11 > > + "${@}" 2>&1 | tee -a "${T}/build-${EPYTHON}.log"
12 > > + exit ${PIPESTATUS[0]}
13 > > ) &
14 > > multijob_post_fork
15 > > }
16 > >
17 >
18 > Why do we call "exit ${PIPESTATUS[0]}"? I have never seen that before.
19
20 ${PIPESTATUS[n]} is exit status of n-th thing in the pipe. So:
21
22 ${PIPESTATUS[0]} is the status of ${1}
23
24 ${PIPESTATUS[1]} == ${?} is the status of 'tee'
25
26 --
27 Best regards,
28 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature