From: Robert Klemme Date: 2004-09-13T18:50:13+09:00 Subject: Re: How to Control Time Behaviour of System Call ? "Christoph Neubauer" schrieb im Newsbeitrag news:ci3p4u$gba$1@news.siemens.at... > Hi Rubyists ! > > Using Ruby 1.6.8 on Windows. > > What I'd like to do is something like: > > timeout (n) do > system ("Call some complex C(++) code, that (maybe) does (not) > return to Ruby") > end > > As far as I understand, "system" steps out of the Ruby sandbox, > such bypassing the timeout control. If the "Call" remains hanging, > the ruby script will 'never' get back control. > > That's no good behaviour for the controller of a regression test. > > Any ideas for solution or workaround welcomed ! Use popen in a different thread. Regards robert