bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug fix description could be broadened...


From: Botte, James - James M
Subject: Bug fix description could be broadened...
Date: Mon, 5 Mar 2007 11:36:54 -0500

Configuration Information [Automatically generated, do not change]:

Machine: powerpc

OS: aix5.2.0.0

Compiler: cc

Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='powerpc'
-DCONF_OSTYPE='a

ix5.2.0.0' -DCONF_MACHTYPE='powerpc-ibm-aix5.2.0.0' -DCONF_VENDOR='ibm'
-DLOCALE

DIR='/usr/local/share/locale' -DPACKAGE='bash' -DSHELL  -DHAVE_CONFIG_H
-I.  -

I. -I./include -I./lib -I./lib/intl -I/home/s0998jbp/bash-3.2/lib/intl
-g

uname output: AIX dev52 2 5 0003227A4C00

Machine Type: powerpc-ibm-aix5.2.0.0

 

Bash Version: 3.2

Patch Level: 9

Release Status: release

 

Description:

 

The bug fix description in the CHANGES file going from bash-3.2-alpha to
bash-3.2-beta. Specifically, the fix 1.b "Fixed a bug in command
printing to avoid confusion between redirections and process
substitution.", could be expanded to include fixed the passing of
exported functions that use redirection followed by process
substitution. I'm presuming that this fix also fix the issue that I was
having.

 

Repeat-By:

 

In Bash 3.1, the following fragment would cause the failure (requires
two programs and a text file):

 

Program "./test_func":

 

#!/usr/local/bin/bash

function test_func {

        while read in_line; do

                echo $in_line

                if [[ $in_line == exit ]]; then

                        break;

                fi

        done < <(tail -f /tmp/testfile)

}; typeset -fx test_func

echo "test_func..."

test_func

./test_prog

exit 0

 

Program "./test_prog":

 

#!/usr/local/bin/bash

echo "test_prog..."

exit 0

 

Touch "/tmp/testfile". Run the "./test_func" program. Echo stuff into
"/tmp/testfile" (append to file, ">>") and it will appear on the stdout
of the "./test_func" program (proves test_func() works okay). Echo the
word "exit" to "/tmp/testfile" and the "./test_prog" program will be
invoked. "./test_prog" will fail with the following message:

 

/usr/local/bin/bash: test_func: line 5: syntax error near unexpected
token `('

/usr/local/bin/bash: test_func: line 5: ` done <<(tail -f
/tmp/testfile)'

/usr/local/bin/bash: error importing function definition for `test_func'

 

Note the lack of space between the redirection character "<" and the
process substitution construct "<(".

 

Fix:

 

Already fixed in 3.2, but the description in the changes file could be
updated to cover this case as well as the described problem.

 

 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]