Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!isc-br!hawk!rsami!rick From: rick@rsami.spoami.com (Rick Schaeffer) Newsgroups: comp.sys.amiga.tech Subject: Re: PIPEs Message-ID: Date: 30 Oct 90 23:53:18 GMT References: Sender: root@hawk.isc-br.com (Rick Schaeffer) Lines: 37 >In article ggk@tirith.UUCP (Gregory Kritsch) writes: >Chuck.Phillips@FtCollins.NCR.COM (Chuck.Phillips) writes: > >Here's the definitions, for the curious. I'd like to know if this IS >possible under 2.0, and if anyone can think of anything which can't be >done with this definition. (If it can't be done under 2.0, I will >eventually kludge it for 1.3 and see if it works with 2.0). > >BPTR POpen(char *cl, int mode, BPTR stdio) > >int PClose(BPTR pfh) > Some time back the Revision Control System (RCS) that I did in conjunction with Ray Brand was posted to comp.amiga.sources. It contains a working popen/pclose pair of functions implemented using the Lattice fexecv function and the AmigaDos 1.3 PIPE: device. (it is also available in the fish disk collection although I don't remember which numbers). The fexecv function has problems execing BCPL programs but works fine with any C or Assembler program I've tried it with. As to the pipe: device itself, it has been 100% reliable for me. The popen() function uses the process's address to create a unique filename for the pipe. Some while back, I modified the popen/pclose functions to use the arp library AsyncRun function which seems to be able to exec everything I've tried (including BCPL stuff). I'm not sure whether it is worth sending to comp.amiga.sources but if there is enough interest I could post to alt.sources otherwise I'll just send via email. It might be worth noting that I spent some time this past weekend playing with the Dos2.0 CreateNewProcess and System functions. They seem to work fine and I'll be doing a popen/pclose using them this weekend. -- Rick Schaeffer UUCP: uunet!isc-br.isc-br.com!ricks ISC-Bunker Ramo ricks@isc-br.isc-br.com Box TAF-C8 Phone: (509)927-5114 Spokane, WA 99220