From: Robert Dober Date: 2008-12-06T19:41:16+09:00 Subject: Re: Force a program to stop if runtime exceeds given duration On Fri, Dec 5, 2008 at 2:59 PM, Aldric Giacomoni <"aldric[remove]"@trevoke.net> wrote: > Everybody automatically assumes that rubyists are using Linux - sadly, in > the medical field Linux is not an option unless you're working with the > modality itself. Medical software is almost all Windows-based.. So, Windows > is where I am for this issue and Windows is where I remain :( Hmm to bad wine is not making more progress. However if you cannot bring WIndows to Linux, there are still some ways to mimick an OS behaviour on Windows, cygwin might be an overkill for this but what about Msys? Sorry for the OT but this still might be helpful for some folks. http://mingw.org/node/18 Mingw/Msys is minimal but you get bash and actually that is all you need ruby & echo "kill $!" > /tmp/xxx sleep 300 && bash /tmp/xxx potentially "nohup" the last command N.B. You can even run ruby in the foreground if you get the PID and issue sleep 300 && kill in a different shell Cheers Robert