tail/watch
Benoit Sigoure f69ef84e36 Fix race in the detection of truncation.
Before going into ChangeEvents(), the code was calling stat on the file
to know where it was at, which is incorrect as stat could return the new
file size post truncation.  Instead we now ask the file descriptor about
our current offset, so we can compare our offset to the file size to try
to detect truncation.

Truncation detection remains brittle, but this closes an annoying race
we frequently run into.
2015-10-27 22:42:26 -07:00
..
filechanges.go run 'go fmt' (and fix 'make fmt' in Makefile) 2013-11-13 17:38:23 -08:00
inotify.go Fix race in the detection of truncation. 2015-10-27 22:42:26 -07:00
inotify_tracker.go Remove pointer from fsnotify.Event 2015-10-27 22:42:26 -07:00
polling.go Fix race in the detection of truncation. 2015-10-27 22:42:26 -07:00
watch.go Fix race in the detection of truncation. 2015-10-27 22:42:26 -07:00