Should this be wrapped in a Timeout.timeout(timeout)...end block like the above unix code?  It looks like someone forgot to do that.