bug-bash
[Top][All Lists]
Advanced

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

Reading bytes one-by-one from pipe of process substitution


From: root
Subject: Reading bytes one-by-one from pipe of process substitution
Date: Thu, 28 Sep 2006 21:12:47 +0600 (YEKST)

Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I../bash -I../bash/include -I../bash/lib   -g -O2
uname output: Linux nuclear 2.6.15-1-686-smp #1 SMP Wed Jan 18 15:26:19 UTC 
2006 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 14
Release Status: release

Description:
        When Process substitution is used, BASH
        reads from such descriptor by one bytes!!

Repeat-By:
        --------------------------
        /tmp/test:
        --begin--
        #!/bin/bash
        while read line; do
          qwe=qwe
        done < <( cat /etc/passwd )
        --end--
        chmod +x /tmp/test
        strace /tmp/test
        --------------------------------------
        You'll see that BASH read bytes from pipe one-by-one.
        Another script will not trigger this problem:
        #!/bin/bash
        while read line; do
          qwe=qwe
        done < /etc/passwd
        
--
        Please answer me to email address@hidden
        when this message will be read
        




reply via email to

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