]> go.fuhry.dev Git - fsnotify.git/commitdiff
Minor doc and test typos
authorPieter Droogendijk <pieter@binky.org.uk>
Sat, 7 Feb 2015 23:34:02 +0000 (00:34 +0100)
committerNathan Youngman <git@nathany.com>
Sun, 8 Feb 2015 20:22:32 +0000 (13:22 -0700)
inotify_poller.go
inotify_poller_test.go

index 796a1717be9baac95dde4bb069434cb80daa97e2..1433a2212438461d7ae59bf8e8e6188e054db5c1 100644 (file)
@@ -71,7 +71,7 @@ func newFdPoller(fd int) (_ *fdPoller, errno error) {
        return poller, nil
 }
 
-// Wait using epoll, then read from inotify.
+// Wait using epoll.
 // Returns true if something is ready to be read,
 // false if there is not.
 func (poller *fdPoller) wait() (bool, error) {
@@ -154,6 +154,7 @@ func (poller *fdPoller) wake() error {
 }
 
 func (poller *fdPoller) clearWake() error {
+       // You have to be woken up a LOT in order to get to 100!
        buf := make([]byte, 100)
        n, errno := syscall.Read(poller.pipe[0], buf)
        if n == -1 {
index 83dc58046e058e6a07ad2bc0b7ff726b0a053cbf..af9f407f8d9284c9f69894c930ed872692371814 100644 (file)
@@ -46,7 +46,7 @@ func (tfd testFd) get(t *testing.T) {
        buf := make([]byte, 10)
        _, errno := syscall.Read(tfd[0], buf)
        if errno != nil {
-               t.Fatalf("Failed to write from pipe: %v", errno)
+               t.Fatalf("Failed to read from pipe: %v", errno)
        }
 }