TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Andrew Clegg
from: Ronald Van Iwaarden
date: 1995-03-20 22:26:52
subject: Pipes in EMX

Andrew Clegg said to Ronald Van Iwaarden:

 AC> 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.

 AC> Let me just make sure I understand this properly:

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

 AC> Is that right?

Exactly!  fork() and exec() are not efficient under OS/2 (there are some
significant restrictions regarding multithreaded programs for fork()) but
they will make more portable code as you mention later that you want.

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 711/401 409 410 413 430 807 808 809 934 955 712/407
SEEN-BY: 712/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™.