Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix suspend resume bug https://gist.github.com/671294

  • Loading branch information...
commit 9c1dc197686e6a8fda24eeb53ab137ad48862d87 1 parent 4252603
daniel watson authored
Showing with 5 additions and 3 deletions.
  1. +5 −3 lib/rb-inotify/notifier.rb
View
8 lib/rb-inotify/notifier.rb
@@ -262,9 +262,11 @@ def close
# Same as IO#readpartial, or as close as we need.
def readpartial(size)
- buffer = FFI::MemoryPointer.new(:char, size)
- size_read = Native.read(fd, buffer, size)
- return buffer.read_string(size_read) if size_read >= 0
+ begin
+ buffer = FFI::MemoryPointer.new(:char, size)
+ size_read = Native.read(fd, buffer, size)
+ return buffer.read_string(size_read) if size_read >= 0
+ end while FFI.errno == Errno::EINTR::Errno
raise SystemCallError.new("Error reading inotify events" +
case FFI.errno
Please sign in to comment.
Something went wrong with that request. Please try again.