Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2008 18:12:43 +0400
From:      rihad <rihad@mail.ru>
To:        Christoph Mallon <christoph.mallon@gmx.de>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: preventing FIFO from EOF
Message-ID:  <4942715B.7090509@mail.ru>
In-Reply-To: <49426C40.6050802@gmx.de>
References:  <494235CA.2050101@mail.ru> <49426C40.6050802@gmx.de>

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4942715B.7090509>