From: matz@... (Yukihiro Matsumoto) Date: 2004-07-29T18:01:22+09:00 Subject: Re: IO issues: forking, select, and duplexing Hi, In message "IO issues: forking, select, and duplexing" on 04/07/29, Hal Fulton writes: |Suppose I have a source and a sink of data. These are IO-like, |but you can't do a select on them. | |I'd like to be able to do a select. | |I'd also like to treat these as a single IO object. If your IO-like object contains a reference to a real IO object that can be a target of select, you can call select on the IO-like object by just adding "to_io" method that returns real IO object. |So I thought: Well, I'll fork a TCPServer. If you really need full duplex IO object using fork, how about using "open" instead of TCPServer: open("|-", "w+") do # the code to copy from STDIN to IO-like # and from IO-like to STDOUT end matz.