Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Dec 2012 08:27:00 +0000 (UTC)
From:      jb <jb.1234abcd@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: bash pipe redirection gets stuck
Message-ID:  <loom.20121204T092200-174@post.gmane.org>
References:  <23353.144.36.114.84.1354545315.squirrel@mail.rule.lv>

next in thread | previous in thread | raw e-mail | index | archive | help
 <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
 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?loom.20121204T092200-174>