The suggestion works perfect for me. I used a separate thread and a queue to communicate when new data i available instead of sleep. It seems more flexible to use pipes than the wrapper, but the wrapper maybe gives nicer code. Thanks Lars -- Posted via http://www.ruby-forum.com/.