From: Lon Baker Date: 2006-04-14T04:49:48+09:00 Subject: Re: IO stream help Thank you! I did not realize that is what I had done. The reason the previous suggested solution did not work, is that the ruby script is not issuing a command, but is only responding to an external process. I thought this: Thread.new(cmd) do |cmd| IO.popen(cmd, 'r+') do |pipe| Issued a command to the system. Where my needs are for a script that is launched by and controlled by the mail server. Here is what happens with the mail server. It issues commands in the following format: 109 FILE Queue/190016.msg\n The number is the thread of communication, all requests and responses start with this to tell the mail server what thread of communication it is dealing with. Its followed by a command, in this example "FILE", which is followed by the argument being the path to a file. The server issues a request for each thread while waiting for the responses, but will never issue a new request for a previously requested thread. Thanks again for the help. I will go back to the drawing board. -- Posted via http://www.ruby-forum.com/.