home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / os2 / programm / 4281 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  1.3 KB

  1. Path: sparky!uunet!dtix!darwin.sura.net!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!PKSMRVM.VNET.IBM.COM!KENKAHN
  2. From: KENKAHN@PKSMRVM.VNET.IBM.COM ("Kenneth A. Kahn")
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Re: I/O Redirection
  5. Message-ID: <9208180003.AA26263@ucbvax.Berkeley.EDU>
  6. Date: 18 Aug 92 00:03:46 GMT
  7. Sender: daemon@ucbvax.BERKELEY.EDU
  8. Lines: 19
  9.  
  10. Organization: Staff of IBM Fellow - NetWork Computing
  11. Disclaimer: This posting represents the poster's views, not those of IBM
  12. News-Software: UReply 3.0
  13. X-X-From: KENKAHN@PKSMRVM.VNET.IBM.COM (Ken Kahn)
  14. References: <1992Aug17.204642.9222@a.cs.okstate.edu>
  15.             <1992Aug17.220541.11379@elroy.jpl.nasa.gov>
  16.  
  17. In <1992Aug17.220541.11379@elroy.jpl.nasa.gov> Les Hartzman writes:
  18. >Can a session redirect all output to stdout to another process?  In other
  19. >words, if a program writes to stdout, can the output be intercepted for
  20. >placement in a particular window on the screen?
  21. >
  22.  
  23. I don't have an example off hand, but what you could do something like the
  24. following scenerio.  If you want to send Process A's output to Process B,
  25. have process A create a Named Pipe (DosMakeNmPipe).  You then redirect StdOut
  26. to the pipe using the Pipe's Write Handle (DosDupHandle).  In process B you
  27. then access the same named pipe and use it's Read Handle to access all the
  28. StdOut from Process A.
  29.