Hi,

Am Mittwoch, 17. Jun 2009, 22:22:49 +0900 schrieb Christopher Carver:
> On Wed, Jun 17, 2009 at 8:08 AM, Andrey Demidov <andrey.demidov / gmail.com>wrote:
> >   I'm running external programs like this:
> >
> >      status = `rdesktop .... &`
> >
> >   But my ruby script doesn't work until the external program finished.
> > How can I run an external program asynchronously?
> >
> system("command")
> 
> You cannot save the output, though.

Yes, you can.

  output = ""
  t = Thread.new { output << `somecmd` }
  ...
  t.alive? or puts "The full output is:", output

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de