On 12/12/11 7:54 AM, Timothy Madden wrote: > I have > GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) on an > up-to-date CentOS 5.7 (Final) x64, > and > GNU bash, version 4.1.10(4)-release (i686-pc-cygwin) on Windows 7 x64 SP1. > > In both OSes I noted that `source´ built-in does not work on a FIFO. On > CentOS the command is just ignored, and on cygwin it blocks indefinitely (I > guess). Ok, cygwin FIFOs may not be a good test case, but I think CentOS > ones are.
This was changed about five years ago, before bash-4.0 was released. > Here is my test example > > [root@appserver2 ~]# mkfifo /tmp/myfifo > [root@appserver2 ~]# echo ls -l >/tmp/myfifo & > [2] 23771 > [root@appserver2 ~]# source /tmp/myfifo # no `ls´ output here... > [root@appserver2 ~]# rm /tmp/myfifo > rm: remove fifo `/tmp/myfifo'? y > [2]+ Exit 1 echo ls -l > /tmp/myfifo > [root@appserver2 ~]# This is a less-than-ideal example, since it attempts to execute the `ls -l' output as commands. Replacing the `ls -l' with `echo hello world' results in `hello world' on bash-4.0, bash-4.1, and bash-4.2 on Mac OS X and RHEL 5. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/