TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Ronald Van Iwaarden
from: Andrew Clegg
date: 1995-03-18 12:33:06
subject: Pipes in EMX

Hi, Ronald.

-=> Ronald Van Iwaarden spaketh unto Andrew Clegg <=-

 RVI> If you now do a fork(), exec() call, then you can have a second
 RVI> program that inherits this pipe from the parent.

Let me just make sure I understand this properly:

1. Call pipe() to create an anonymous, two-channel pipe.
2. Call fork() to produce a second copy of the program.
3. Call one of the exec* functions to replace copy #2 of the original
program with the new program.
4. Copy #1 of the original program, and the new program, will now be
connected via the pipe.

Is that right?

 RVI>  Instead of an
 RVI> anonymous pipe, you might want to use a named pipe instead.

I prefer portable code if possible, and I have no API docs yet.

 RVI>  For a
 RVI> good explanation of anonymous pipes, pick up "Advance Unix
 RVI> Programming" by Marc J. Rochkind which will give some good UNIX
 RVI> examples which port to EMX quite well.

Thanks, I'll remember to check that out sometime.

Andrew.

/* 2:440/4.10{at}fidonet.org 81:444/1.10{at}os2net.org 102:440/5.10{at}lifnet.org
   abc{at}warpfive.demon.co.uk   Stig{at}IRC   Andrew.Clegg{at}donor2.demon.co.uk */

--- LoraBBS-OS/2 v2.35 (Eval.)
* Origin: Ten Ground And Down, Guildford UK (2:440/4.10)
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: 440/4 141/209 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™.