bash pipe redirection gets stuck

jb jb.1234abcd at gmail.com
Tue Dec 4 08:27:24 UTC 2012


 <long <at> rule.lv> writes:

> 
> Dear all,
> I stumbled upon a problem where multiple pipe redirection occasionally get
> stuck when trying to get sha256 sum of a stream.
> 
> You can try to reproduce the problem if you have /usr/ports/shells/bash
> installed (output redirection used in this command is possible only in
> bash).
> Create temporary test file with command: "dd if=/dev/urandom of=/tmp/file1
> bs=1k count=10"
> And the command I'm using is:
> /usr/local/bin/bash -c 'cat /tmp/file1 | tee >(/sbin/sha256 >
> /tmp/file1.sha256) > /tmp/file1.copy' ; echo $status

I could reproduce it on FreeBSD 9.0-RELEASE-p3 on 3rd try, but after upgrade
of bash-4.1.11 to bash-4.2.37 it works (tested 30 times).
jb
 



More information about the freebsd-questions mailing list