From: Hal Fulton Date: 2004-07-29T22:46:05+09:00 Subject: Re: IO issues: forking, select, and duplexing Yukihiro Matsumoto wrote: > > 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. That is very interesting. I don't think I can do this easily (as the code is from a third party), but I'll look at it. > |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 This is also very interesting. I will try this soon. Thanks, Hal