We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please answer these questions before submitting your issue. Thanks!
go version
go env
GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/usr/local/git_tree/gopath_third_party:/usr/local/git_tree/gopath:/usr/local/git_tree/gopath_third_party:/usr/local/git_tree/gopath" GORACE="" GOROOT="/usr/lib64/go" GOTOOLDIR="/usr/lib64/go/pkg/tool/linux_amd64" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0" CXX="g++" CGO_ENABLED="1"
package main import ( "bytes" "io/ioutil" "log" "os" "strconv" "sync" "time" "golang.org/x/exp/inotify" ) var dosleep = true func main() { w, err := inotify.NewWatcher() if err != nil { log.Fatal(err) } if err := w.Watch("."); err != nil { log.Fatal(err) } var wg sync.WaitGroup wg.Add(1) go func() { for err := range w.Error { log.Println(err) } }() go func() { for event := range w.Event { if event.Mask&inotify.IN_Q_OVERFLOW == inotify.IN_Q_OVERFLOW { log.Println("inotify.IN_Q_OVERFLOW") } if dosleep { time.Sleep(time.Second) } } }() go func() { b, err := ioutil.ReadFile("/proc/sys/fs/inotify/max_queued_events") if err != nil { log.Fatal(err) } b = bytes.TrimSpace(b) queuesize, err := strconv.Atoi(string(b)) if err != nil { log.Fatal(err) } queuesize *= 2 log.Println("iterating", queuesize, "times") for i := 0; i < queuesize; i++ { if f, err := os.Create("_test"); err != nil { log.Fatal(err) } else { f.Close() os.Remove("_test") } } log.Println("stop iterating, drain queue") dosleep = false }() wg.Wait() }
The text was updated successfully, but these errors were encountered:
CL https://golang.org/cl/24990 mentions this issue.
Sorry, something went wrong.
Deleted this code instead. See github.com/fsnotify for more maintained code.
No branches or pull requests
Please answer these questions before submitting your issue. Thanks!
go version
)?go version go1.6.2 linux/amd64
go env
)?If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
Either a error indicating that queue got overflowed or "inotify.IN_Q_OVERFLOW" message
nothing
The text was updated successfully, but these errors were encountered: