From 427ac38fe3eeadad1d6fb897bd835607a9372aad Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 11 Oct 2009 01:37:20 -0700 Subject: graceful exit on trap TypeError from IO.select Avoid potential race conditions with signal handlers, this makes exits cleaner since the LISTENERS array will get map!-ed to nils in the :QUIT signal handler. --- lib/rainbows/thread_spawn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/thread_spawn.rb') diff --git a/lib/rainbows/thread_spawn.rb b/lib/rainbows/thread_spawn.rb index f1acf07..32040ad 100644 --- a/lib/rainbows/thread_spawn.rb +++ b/lib/rainbows/thread_spawn.rb @@ -32,7 +32,7 @@ module Rainbows IO.select(LISTENERS, nil, nil, timeout/2.0) or next rescue Errno::EINTR retry - rescue Errno::EBADF + rescue Errno::EBADF, TypeError break end -- cgit v1.2.3-24-ge0c7