From: MonkeeSage Date: 2006-09-09T13:01:59+09:00 Subject: Re: Capturing stderr from Kernel.exec Carl Lerche wrote: > Hello, > > I'm trying to run some simple commands using Kernel.exec but need to > capture the stderr for them. Is there an (easy) way to do it with > just ruby and the standard library or should I get open4? > > Thanks, > -carl Kernel#exec never returns control; it replaces the ruby process with the one you pass it. You need open3 (stdlib) or popen4. [1] http://ruby-doc.org/stdlib/libdoc/open3/rdoc/index.html [2] http://popen4.rubyforge.org/ Regards, Jordan