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 |