Hi all

When I run the bash test lastpipe.tests, there were some errors occurred.

The code in lastpipe.tests:

    shopt -s lastpipe
    ...
    exit 142 | false
    echo $? -- ${PIPESTATUS[@]}

The error output:

    lastpipe.tests: line 41:   708 Exit 142                exit 142
    703 Hangup                  | false
    129 -- 142 129

The lastpipe.right is:

    ...
    1 -- 142 1
    ...

When I run the above line by line, it was correct.

    $ shopt -s lastpipe
    $ exit 142 | false
    $ echo $? -- ${PIPESTATUS[@]}
    $ 1 -- 142 1

That is strange.

//dengke




Reply via email to