Tom Gundersen, 2011-06-26 13:51:
On Sun, Jun 26, 2011 at 1:03 PM, Kurt J. Bosch
<[email protected]>  wrote:
The following test case (run in a terminal)

#!/bin/bash

# custom override example
stat_busy() {
        if (( PUSH_MSG )); then
                # This triggers the error in "$@" below
                # actual code was:
                # echo set message "$1">  "$spl_fifo"&
                :&
        fi
        echo "$1" BUSY
}

status() {
        stat_busy "$1"
        shift
        "$@"
        local retval=$?
        (( retval == 0 ))&&  echo DONE || echo FAIL "($retval)"
}

PUSH_MSG=0 status "test #0" cat<(echo foo)
PUSH_MSG=1 status "test #1" cat<(echo foo)

[...]

CCing Tom Gundersen.

Thanks.

I have not figured it out, but here is a more minimal test:


#!/bin/bash


test_one() {
        : &
        "$@"
}

test_two() {
        :
        "$@"
}

# working
test_one eval 'cat<(echo foo)'
test_two cat<(echo foo)

#not working
test_one cat<(echo foo)

Confirmed.

--
Kurt

Reply via email to