From: Paul Lutus Date: 2006-09-20T10:10:06+09:00 Subject: Re: piping input when shelling out Caio Chassot wrote: > > On 2006-09-19, at 21:51 , Daniel N wrote: > >>> >>> You could try using IO#popen The docs are at >> >> http://www.ruby-doc.org/core/classes/IO.html#M001247 >> >> Hope this is what your after. > > Looks like it. Thanks a lot. > > Do you know if it places the exit code in $? ? > > I wonder what happens if the subprocess is killed by the system? > > I guess I'll run some tests, but if you happen to know the answers, > I'd be glad to hear them nonetheless. The problem with File.popen() is that you want bidirectional communication with the child process, and AFAIK that doesn't offer it -- you can either read, or write, to the pipe, but not both. -- Paul Lutus http://www.arachnoid.com