TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Thomas Seeling
from: Ruud Senden
date: 1996-03-27 20:45:46
subject: Redirection

Thomas Seeling schreef op 25 Mar 1996 om 00:02 aan Ruud Senden:

 RS> Suppose I have a program which reads it's input from stdin, and
 RS> sends it's output to stdout. A CGI-script on the WWW-server 
 RS> should be able to send and receive information to the permanent 
 RS> process  

 TS> You will want to redirect stdin/stdout to pipes created with pipe()
 TS> or DosCreatePipe(), then save the current state of stdin/stdout, 
 TS> DosDupHandle() the respective end of the two pipes to the handle 
 TS> numbers associated with stdin/stdout (0/1), call the CGI script 
 TS> and then restore the previous associations of stdin/stdout.

Thank you for your answer. I think these tips will help a lot, it looks
like it should work this way. I don't have time right now to create a
working program with these suggestions, but I will try it as soon as
possible.

Regards, Ruud 

--- timEd/2 1.10+
* Origin: The OS/2 Warp Based System (2:280/804.2054)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 280/804 801 270/101 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™.