9fans archive / 2000 / 08 / 16 /    prev next

From: Stephen Harris <sharris@nct...>
Subject: [9fans] pipefile with regular file
Date: Tue, 1 Aug 2000 09:30:55 -0500 (CDT)

Pipefile is great, it's simple and I like how it uses namespace ability
of Plan9 to give us a read "stream filter" which later apps don't need 
to even know about.

But I am having a problem with reads on a filtered regular file not ever 
hitting EOF:

(this is from memory:)
pipefile -r 'tr a-z A-Z' myfile

cat myfile
(uppercase text to the terminal, but no prompt)

I had to kill the cat with <del> :-o
Same thing if I redirect the cat to a file, have to kill it with <del>.

I thought it would go like:
	i ) tr eventually hits EOF
	ii) tr exits as last writer on internal pipe (data1) supplying 
	   data to be read by clients (cat) reading myfile
	iii) cat reads the remaining data if any and then hits EOF (there
	     being no more writers), and exits.
	
Anybody see why that's not happening, or does it work for you?

Steve

Everything you do from now on will be more fun - Windows 95 installation