From 7beb45183d2ab48bfc9616d9a019513a123a4983 Mon Sep 17 00:00:00 2001 From: Chris Howey Date: Wed, 3 Jul 2013 07:47:43 -0500 Subject: [PATCH] Linux - Remove Select() syscall for now Needs more testing, getting reports from users of no new events on some Linux systems after adding Select() call. --- fsnotify_linux.go | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/fsnotify_linux.go b/fsnotify_linux.go index 2ee1d4d..ff2f235 100644 --- a/fsnotify_linux.go +++ b/fsnotify_linux.go @@ -203,18 +203,7 @@ func (w *Watcher) readEvents() { errno error // Syscall errno ) - rfds := &syscall.FdSet{} - timeout := &syscall.Timeval{} - for { - // Select to see if data available - *timeout = syscall.NsecToTimeval(selectWaitTime) - FD_ZERO(rfds) - FD_SET(rfds, w.fd) - if _, errno = syscall.Select(w.fd+1, rfds, nil, nil, timeout); errno != nil { - w.Error <- os.NewSyscallError("select", errno) - } - // See if there is a message on the "done" channel select { case <-w.done: @@ -225,12 +214,7 @@ func (w *Watcher) readEvents() { default: } - // Check select result to see if Read will block, only read if no blocking. - if FD_ISSET(rfds, w.fd) { n, errno = syscall.Read(w.fd, buf[0:]) - } else { - continue - } // If EOF is received if n == 0 { -- 2.50.1