From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 12 14:12:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2EA1065675 for ; Fri, 12 Dec 2008 14:12:47 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from mx7.mail.ru (mx7.mail.ru [194.67.23.27]) by mx1.freebsd.org (Postfix) with ESMTP id 2AD5D8FC19 for ; Fri, 12 Dec 2008 14:12:46 +0000 (UTC) (envelope-from rihad@mail.ru) Received: from [217.25.27.27] (port=13997 helo=[217.25.27.27]) by mx7.mail.ru with asmtp id 1LB8l2-000H42-00; Fri, 12 Dec 2008 17:12:44 +0300 Message-ID: <4942715B.7090509@mail.ru> Date: Fri, 12 Dec 2008 18:12:43 +0400 From: rihad User-Agent: Icedove 1.5.0.14eol (X11/20080724) MIME-Version: 1.0 To: Christoph Mallon References: <494235CA.2050101@mail.ru> <49426C40.6050802@gmx.de> In-Reply-To: <49426C40.6050802@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mras: OK X-Mailman-Approved-At: Fri, 12 Dec 2008 18:33:46 +0000 Cc: freebsd-hackers@freebsd.org Subject: Re: preventing FIFO from EOF X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 14:12:47 -0000 Christoph Mallon wrote: > rihad schrieb: > Something as simple as this: > $ sh < /dev/null > /var/tmp/kick 2>/dev/null > seems to block indefinitely, but exits as soon as I run > $ buffer -i /var/tmp/foo > (and buffer exits too) Strangely enough, something as stupid as this does the trick: sh < /dev/stdout > /var/tmp/kick 2>/dev/null i.e. reading from stdout blocks. Now sh keeps buffer block on /var/tmp/kick and never exit ;) I'm not sure what this does or why and how it works Unix-wise.