From: Space Ship Traveller Date: 2009-09-19T12:23:24+09:00 Subject: Re: Subprocessing with popen or popen3? --Apple-Mail-2-145103194 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes You might find my framework "rexec" useful: RExec [Orion Transfer Wiki] More specifically: [RDOC] http://gems.oriontransfer.org/doc_root/rexec-1.1.6/rdoc/index.html RExec::Task rexec can help you make a daemon: RubyDNS and RExec Updates [Orion Transfer Wiki] Kind regards, Samuel On 19/09/2009, at 2:01 AM, Dylan Lukes wrote: > Currently I have a class MyServer that extends IO, and then I call: > > server = MyServer.popen(COMMAND, 'r+) > > The only problem is I need to separate stderr and stdout. I > contemplated > popen3, but I don't see how I can make it associated with an object, > which I need in the program. And in addition, it seems to lack a way > to > get the pid. > > I could theoretically create the stderr, stdout and stdin within the > MyServer class at initialization for popen3, but then I can't use the > pid to kill the process when I call the shutdown method. Any ideas? > -- > Posted via http://www.ruby-forum.com/. > --Apple-Mail-2-145103194--