From: Ema Fuma Date: 2008-06-16T01:32:44+09:00 Subject: Timeout lengthy external executable Hi all, I'm new to Ruby, I'm trying to use it to create a script where I launch some executables. I'd like to timeout if one of them takes too long, I'm using IO.popen to launch the exe. The problem is that the timeout doesn't seem to work, so if my executable hangs for some reason I have no way to stop it and go on. Is there something I can do? If I use "system" instead of IO.popen it works but I need popen to parse stdout I include a simplified code of what I'm doing (no parsing) Thanks in advance for any tips on that Bye begin timeout(5) { IO.popen(command_media) } puts "Timeout didn't occur" rescue Timeout::Error puts "Timed out!" end -- Posted via http://www.ruby-forum.com/.