hpcloud / tail

Go package for reading from continously updated files (tail -f)
MIT License
2.72k stars 505 forks source link

Tailing stops (gets stuck) in certain conditions #97

Open arunmathew88 opened 8 years ago

arunmathew88 commented 8 years ago

Deferred RemoveWatch() [https://github.com/hpcloud/tail/blob/v1.0.0/watch/inotify.go#L78] may at times cause the WatchCreate (called indirectly by NotifyDeleted() ) to run before RemoveWatch(). This prevents the WatchCreate from adding a watcher on the file’s parent directory for watching file creates, since the data structures still reflects as if the file is being being watched.

Possibly Fixes Issue https://github.com/hpcloud/tail/issues/90