From: Charles Oliver Nutter Date: 2010-01-16T09:46:36+09:00 Subject: Re: xrefresh server, rb-inotify and ioselect On Thu, Jan 14, 2010 at 8:36 AM, Marc Weber wrote: > This seems to work. I'm still interested what's causing this trouble. > Obviously there is a problem with the to_io code which looks like this: > > >  def to_io >    raise NotImplementedError.new("INotify::Notifier#to_io is not supported under JRuby") if RUBY_PLATFORM =~ /java/ >    IO.new(@fd) >  end > > So ruby doesn't like callign IO.new(@fd) over and over again. If you create an IO object to wrap an fd, when it GCs it will close that fd. I'm not sure if there's a way to "detach" from a given fd so it doesn't close. You might prefer reopen instead of creating new IOs every time. - Charlie