🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11054

Re: popen/pclose for 1.3

#11054
From: Stephen Walton
Date: Thu, 19 Jan 1989 01:33
19 lines
1511 bytes
In article <3768@druwy.ATT.COM> mab@druwy.ATT.COM (Alan Bland) writes:
>
>Does anyone have a UNIX-like implementation of popen and pclose that
>uses the 1.3 pipe handler?  I'm porting some UNIX code and would like
>to take advantage of pipes.  I could roll my own, but I haven't yet
>learned all the secrets of file handles with Execute()...

Pipes on the Amiga are really much simpler than you think (I think :-) ).
Just pretend they are files.  Then, instead of something like:
	pipe_handle = popen("command", "w");
you would do
	pipe_handle = fopen("pipe:myfile", "w");
	Execute("command <pipe:myfile", 0L, 0L);
and voila.  You probably want to use mktemp() to generate your pipe
file name, just to be safe.
-- 
Stephen Walton, Dept. of Physics & Astronomy, Cal State Univ. Northridge
RCKG01M@CALSTATE.BITNET       ecphssrw@afws.csun.edu
swalton@solar.stanford.edu    ...!csun!afws.csun.edu!ecphssrw
Technical Details
Message-ID: <442@solaria.csun.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!shamash!nic.MR.NET!csd4.milw.wisc.edu!bionet!agate!helios.ee.lbl.gov!nosc!ucsd!orion.cf.uci.edu!oberon!sm.unisys.com!csun!solaria!ecphssrw
References: <3768@druwy.ATT.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tank!shamash!nic.MR.NET!csd4.milw.wisc.edu!bionet!agate!helios.ee.lbl.gov!nosc!ucsd!orion.cf.uci.edu!oberon!sm.unisys.com!csun!solaria!ecphssrw
From: ecphssrw@solaria.csun.edu (Stephen Walton)
Newsgroups: comp.sys.amiga.tech
Subject: Re: popen/pclose for 1.3
Summary: Pretend PIPE: contains files
Keywords: pipes
Message-ID: <442@solaria.csun.edu>
Date: 19 Jan 89 01:33:30 GMT
References: <3768@druwy.ATT.COM>
Reply-To: ecphssrw@solaria.csun.edu (Stephen R. Walton)
Distribution: comp
Organization: California State University, Northridge
Lines: 19