TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Andrew Clegg
from: Ronald Van Iwaarden
date: 1995-03-11 10:27:36
subject: Pipes in EMX

Andrew Clegg said to All:

 AC> I am having some problems working out how to use anonymous
 AC> pipes in EMX. 

 AC> I want to start a child process and communicate with its
 AC> stdin and stdout. I have looked at popen(), which lets me
 AC> start it with a pipe connected to stdin *or* stdout, but it
 AC> doesn't seem to be what I want; and pipe(), which creates a
 AC> pipe with two handles (one for reading and one for writing)
 AC> but I can't understand how I am supposed to 'connect' this
 AC> pipe to a process. 

 AC> Can anyone help?

If you now do a fork(), exec() call, then you can have a second program
that inherits this pipe from the parent.  Instead of an anonymous pipe, you
might want to use a named pipe instead.  For a good explanation of
anonymous pipes, pick up "Advance Unix Programming" by Marc J.
Rochkind which will give some good UNIX examples which port to EMX quite
well.

TTYL,

=--Ron  TeamOS2

Fidonet:  Ronald Van Iwaarden 1:104/338{at}fidonet.org
OS2net:   Ronald Van Iwaarden 81:313/1{at}os2net.ftn
Internet: rvaniwaa{at}carbon.denver.colorado.edu
--- timEd/2-B9
* Origin: The OS/2 Source BBS [303]744-0373 (1:104/338)
SEEN-BY: 105/42 620/243 624/50 711/401 409 410 413 430 807 808 809 934 955
SEEN-BY: 712/407 515 628 704 713/888 800/1 7877/2809
@PATH: 104/338 730 1 3615/50 396/1 270/101 105/103 42 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.