[comp.sys.amiga] 1.3 Pipe device bug

bmacintyre@watcgl.waterloo.edu (Blair MacIntyre) (05/29/89)

I've discovered a feature of the 1.3 pipe: device that should probably be
more appropriately named a bug.

While writing my Arexx backup script, I was doing the following:

tempfilename = translate(x,"XX",":/")
pipefile = "dpipe:" || tempfilename
thedate = 'file' || tempfilename
'run >null: ls' ">"pipefile "-l" x
call open thedate, pipefile, 'Read'

I was doing this to get a "ls -l" type of listing of a directory.  The
problem is, if I use pipe: instead of dpipe: above, the script stops 
working.  The problem manifests itself when I try to recursively do 
subdirectories ( that is the reason for all the convoluded file and
pipe names ).  If I open the pipe:
	
	pipe:dh1XrexxX

and then open the pipe:

	pipe:dh1XrexxXfredX

the pipe device gets confused, and either one of the pipes ends, one
end blocks or one of the two "ls -l"'s goes to the WRONG pipe!

Usually what happens is the first pipe read just ends without finishing
reading the pipe!

Matt's pipe handler ( the newest one ) works fine, however!
( good job! )

Blair
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-///-=
= Blair MacIntyre, bmacintyre@watcgl.{waterloo.edu, UWaterloo.ca}     \\\///  =
=   now appearing at the Computer Graphics Lab, U of Waterloo!         \XX/   =
= "Don't be mean ... remember, no matter where you go, there you are." BBanzai=