I've squashed my v5 and v4 patches together as r47617.  Thanks NoICE for
the confirmation on OSX (where this problem was originally reported).

usa:  We may need additional testing on WIN32, but I think
rb_wait_for_single_fd works around many existing compatibility
issues.  Thanks.