Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!pprg.unm.edu!hc!ames!oliveb!pyramid!ncc!myrias!cg From: cg@myrias.UUCP (Chris Gray) Newsgroups: comp.sys.amiga Subject: Re: Using PIPE: device Summary: PIPE: depends on the Open mode Keywords: PIPE: Message-ID: <815@myrias.UUCP> Date: 31 Jan 89 01:29:27 GMT References: <167@nrl-cmf.UUCP> Organization: Myrias Research Corporation Lines: 35 In article <167@nrl-cmf.UUCP> healy@nrl-cmf.UUCP (Liam Healy) writes: >I am having trouble using the PIPE: device. >I am writing a file in DME, and I want to feed the finished >file into Proff. So, I saveas PIPE:a, go to a CLI, and then >run proff PIPE:a foo.fmt. No output, DME locks up. So I do it >the other way around, i.e., run proff first then save from DME. >A little better this time ... I get a file foo.fmt, but it is >empty. Am I doing something stupid? By the way, I can use the >PIPE: device without problems with e.g. > run copy file PIPE:a > proff PIPE:a foo.fmt >but that defeats the idea of a pipe. >Thanks for the help. Well, it just so happens that I spent a couple hours over the weekend in messing with PIPE: w.r.t. my Draco library (should go out tomorrow??). The PIPE: device is sort of picky about what mode is used to Open it. MODE_NEWFILE - should be used by the write end. MODE_OLDFILE - should be used by the read end. Other modes will SEEM to work (in fact, either end can read or write), but the end-of-file signal when the writer closes the PIPE: will only get to the reader if the above modes were used. Thus, I suspect that DME is using (at a guess), MODE_READWRITE, which can indeed cause one end or the other to hang. Thus, there is probably not much that you, a user, can do about it. The only fix is to change DME. This would have to be kludgey, since you want different modes for PIPE: than you would normally use for files (MODE_NEWFILE for a file empties the file). I ended up putting some specific tests for "pipe:" in my Draco I/O library. (Ugh!) -- Chris Gray Myrias Research, Edmonton +1 403 428 1616 {uunet!mnetor,ubc-vision,watmath,vax135}!alberta!myrias!cg