From owner-freebsd-questions@FreeBSD.ORG Tue Dec 4 08:27:24 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 71957597 for ; Tue, 4 Dec 2012 08:27:24 +0000 (UTC) (envelope-from freebsd-questions@m.gmane.org) Received: from plane.gmane.org (plane.gmane.org [80.91.229.3]) by mx1.freebsd.org (Postfix) with ESMTP id 1ECA68FC0C for ; Tue, 4 Dec 2012 08:27:23 +0000 (UTC) Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Tfnqk-0001X6-S3 for freebsd-questions@freebsd.org; Tue, 04 Dec 2012 09:27:33 +0100 Received: from 79-139-19-75.prenet.pl ([79.139.19.75]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Dec 2012 09:27:30 +0100 Received: from jb.1234abcd by 79-139-19-75.prenet.pl with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Dec 2012 09:27:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-questions@freebsd.org From: jb Subject: Re: bash pipe redirection gets stuck Date: Tue, 4 Dec 2012 08:27:00 +0000 (UTC) Lines: 20 Message-ID: References: <23353.144.36.114.84.1354545315.squirrel@mail.rule.lv> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 79.139.19.75 (Mozilla/5.0 (X11; FreeBSD i386; rv:9.0.1) Gecko/20100101 Firefox/9.0.1) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 08:27:24 -0000 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