Set a timeout based on signals, which are more reliable than Ruby's Timeout module based on green threads.