Commit Graph

20 Commits

Author SHA1 Message Date
loveshell ff96e4fb6a change 2021-10-13 21:28:19 +08:00
Lucas Kacher 000912af8d fix fsnotify relocation
* http://gopkg.in/fsnotify/fsnotify.v1 is the new location
* see: https://github.com/go-fsnotify/fsnotify
2018-03-21 11:19:57 -04:00
Vlad Losev 2e79377851
Restores error propagation from fsnotify.Watcher.Add. 2017-03-20 18:08:26 -07:00
Vlad Losev 669c44045e
Fixes leak of watch counters in InotifyTracker.remove. 2017-03-20 17:50:07 -07:00
Vlad Losev b0c08f2030
Fixes log reopening. 2017-03-18 14:25:17 -07:00
Arne Bahlo 9c97d7511f Return error on tail.Cleanup 2016-09-02 22:15:29 +02:00
Nino Khodabandeh 34db8a6edf Updates licensing and all the header comments 2016-04-26 15:47:46 -07:00
Benoit Sigoure 5e2d004af5 watch: Fix prototype to be more restrictive.
Change-Id: Ic744312efa91cf5c2dc2810e597353a080dccb70
2016-04-08 16:29:40 -07:00
Benoit Sigoure ac5972aca8 watch: Unsubscribe from fsnotify synchronously.
Calling watcher.Remove() from the run() goroutine is now problematic,
because with the change made in fsnotify/fsnotify#73 Remove() can now
take an arbitrary amount of time, which means we can deadlock if run()
is waiting for fsnotify to acknowledge the removal and fsnotify is
trying to send an unrelated Event.

So instead we now do part of the cleanup, including calling Remove(),
synchronously, in the goroutine trying to unsubscribe.

This fixes #75.  Thanks to Aaron Beitch for the fix.

Change-Id: I346c9eecc34b2378312b07b3c3efc41616b95380
2016-04-08 16:29:40 -07:00
miraclesu 6aef373ea6 fix block until exists function 2015-12-09 15:29:06 +08:00
Alex Liu abb1479f04 Remove pointer from fsnotify.Event 2015-10-27 22:42:26 -07:00
Alex Liu 8b4773e24e Upgrade to fsnotify.v1 2015-10-27 22:42:25 -07:00
Andy Ouyang d46611791d Moved InotifyTracker initialization to constructor function 2015-10-27 22:42:25 -07:00
Andy Ouyang a5dc0d39ba Ensure InotifyTracker attempts to send all FileEvents 2015-10-27 22:42:25 -07:00
Andy Ouyang f053e2cd0c Fixed race conditions in watch/inotify_tracker.go 2015-10-27 22:42:25 -07:00
Andy Ouyang 0b9f044bb3 Ignoring EINTR (ctrl+Z) signal 2015-10-27 22:42:25 -07:00
Andy Ouyang b155fc13d4 Single shared Watcher used to avoid inotify limit 2015-10-27 22:42:07 -07:00
Sridhar Ratnakumar 15e71d383e Use stable version of fsnotify
fixes #46
2015-06-28 20:23:06 -07:00
Sridhar Ratnakumar baf6674f00 add copyright statements 2014-04-12 16:59:40 -07:00
Sridhar Ratnakumar 323e1c0988 add Cleanup function to close open inotify watches
bug: 101635
2013-11-12 20:15:27 -08:00